therecipe / qt

Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScript / WebAssembly
GNU Lesser General Public License v3.0
10.5k stars 749 forks source link

access QML controls via func #645

Open arpitjindal97 opened 6 years ago

arpitjindal97 commented 6 years ago

I have a qml file containing button and tableview. I have created CustomTableModel for tableview.

Button {
                id: button
                x: 51
                y: 13
                width: 101
                height: 28
                text: qsTr("Start")
                onClicked: tableView.model.start(button)
                anchors.verticalCenter: parent.verticalCenter
       }

How should start() be defined to get the instance of button. I want to change the text of button on click inside the golang function

akiyosi commented 6 years ago

Do you want to know how to use qml files? It is explained below.

https://github.com/therecipe/qt/issues/631

arpitjindal97 commented 6 years ago

doesn't answer my question

akiyosi commented 6 years ago

I'm sorry. I did not read the last sentence of the question. I do not have an answer to that.