[Qt-qml] How get informations from a qml-object ?

2010-11-08 Thread Thomas PABST
Hi, I recently discover the new QML language. I try to find the better way to make modular software. I currently trying to find how to get value of variables without entering the same value twice in another item, for example the size of the main screen. I would like to get the value of variables

Re: [Qt-qml] How get informations from a qml-object ?

2010-11-08 Thread Juha Turunen
Hi Thomas, If the item you want to refer to has an id (not dynamically created) you can give the rootitem in your main.qml and id and then simply refer to it or bind other properties to it by it's id. For example: First.qml: import Qt 4.7 Item { id: screen width: 500 height: 300