11-19-2013 01:06 PM
Has anyone ever setup communication between multiple QML objects? It probably is a built-in capability. I am capturing input from a SystemPrompt and populating a TextField in another QML Object. I am saving the input to a QSetting before displaying it. This input can go to multiple QML object so I have set it up as a QProperty in my main module. I quess I need to setup a Slot/Signal combo to get it to update in all QML Objects, but don't quit know how to go about this.
Any recommendations ?
Solved! Go to Solution.
11-19-2013 01:37 PM - edited 11-19-2013 01:41 PM
If i understood
Then you only need to set NOTIFY signal to your property and emitting it if data changed.
Q_PROPERTY(int myData READ myData WRITE setMyData NOTIFY myDataChanged)
Then emit myDataChanged signal inside setMyData function. After emit the signal the property is changed in all QML files
11-19-2013 03:08 PM
11-19-2013 04:51 PM
I don't think, in this case, that it is a trivial matter... the connection is between a standard QML object (the text field) and a SystemPrompt dialog. I believe some other mechanisms need to come into play in order to get the string from the dialog.
11-19-2013 07:22 PM
04-10-2014 01:56 AM
04-10-2014 01:59 AM - edited 04-10-2014 02:00 AM
These links go through how two QML objects can iteract with code examples...
[Edit] By the way I wasn't laughing at you above, just the length of time between the OP and response.