Adding Connections
You can use the Connections view (commercial only) to:
- Connect objects to signals.
- Specify dynamic properties for objects.
- Create bindings between the properties of two objects.
Connecting Objects to Signals
To connect objects to signals in QML, create Connections objects.
To create the connections:
- Select the Connections tab.
- Select Target to add the object to connect to a signal.
- Select Signal Handler to select the signal that the connection will listen to from a list of all signals available for the object.
- Select Actions to specify the action to perform when the signal is emitted. You use JavaScript to specify the actions.
Specifying Dynamic Properties
You can bind Properties to dynamic expressions to define global properties for an object that can be read by other objects. For example, you can specify global properties for the root object that you can use in the child objects.
To specify dynamic properties for an object:
- Select the Dynamic Properties tab.
- Select Item to select the object to specify the property for.
- Select Property to give a name to the property.
- Select Property Type to specify the type of the property.
- Select Property Value to specify the value of the property.
Adding Bindings Between Properties
To dynamically change the behavior of an object, you can create a Property Binding between the properties of two objects.
To bind a property of an object to the property of another object:
- Select the Bindings tab.
- Select Item to select the target object whose property you want to change dynamically.
- Select Property to specify the property to bind to a source property.
- Select Source Item to specify the object whose property you want to use to determine the behavior of the target object.
- Select Source Property to specify the property to bind the target property to.
© 2015 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.