Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Call a qml function from C++.

$
0
0
Use slots or Q_INVOKABLE. c++ class Blah { .... public slots:    void iveBeenClicked() }; Pass class to qml Blah foo; view->rootContext()->setContextProperty("myblah", &blah); Qml Button {   onClicked: myblah.iveBeenClicked() }   Button {   id: lateButton }   Component.onCompleted: lateButton.clicked.connect(myblah.iveBeenClicked())

Viewing all articles
Browse latest Browse all 4972

Trending Articles