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 by calling a method. Using parent object isn't always possible (ie QML Component Element) and it is very heavy to call the parents' variables when we have a multi-level tree.
main.qml > Item { > height: 480; > width: 800; > HomeFrame{ > } > } > HomeFrame.qml > HomeFrame{ > Rectangle{ > ... some info... > Widget{ > > } > } > } > Widget.qml > Widget{ property int width; > width: //How call the main.qml => item=>width ?? > } > I wonder if it's possible only using QML or if we need to use qt/c++ ! Something like that : Widget.qml > Widget{ property int width; > width: screen.getwidth(); > } Thanks ----------------------------------------------------- Thomas PABST thomas.pa...@gmail.com
_______________________________________________ Qt-qml mailing list Qt-qml@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-qml