Element
Unsolved
QML and Qt Quick
-
-
Hi,
I use a QML element in my .qml files. It can be root item or it can be nested in another items.I want all these QML elements to have height of half of the Window element (which is root of all QML elements in my application)? How to do that?
@MartinD
I think you can read QML property binding -
Add id to your window
Window{ id: screen ... }
In any other QML file
Rectangle{ height: screen.height/2 }
This will work if Window is a main application window.