[Qt-qml] QML Slot
michael.brasser at nokia.com
michael.brasser at nokia.com
Wed Jul 14 01:37:11 CEST 2010
Hi Almo,
On 14/07/2010, at 6:30 AM, ext Almo Nito wrote:
I would like to know how i can connect to a Signal in QML if the object was not instanced from QML:
Im having an Object _COMM;
That was registered using:
ctxt->setContextProperty("CommObject",_COMM);
I can actually use CommObject.doMyInvolkeMethod() in QML
But how do I connect to a signal that gets emmited that instace of _COMM in QML?
You should be able to use the Connections element for this (http://doc.qt.nokia.com/4.7-snapshot/qml-connections.html):
Connections {
target: CommObject
onMySignal: console.log("here I am!")
}
Regards,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100714/94a37914/attachment.html
More information about the Qt-qml
mailing list