How to set a "instant" value instead of a relative value of a property? Simple example...
QML and Qt Quick
2
Posts
1
Posters
776
Views
1
Watching
-
rect2 width and height must be half of its parent width and height. But I want that just at the beginning. If the user resizes the window, I don't want the rect2 to recalculate his width and height based on its parent size. Example:
@Rectangle {
id: rect;
width: 360;
height: 360;
color: "black";Rectangle { id: rect2; width: rect.width*0.5; height: rect.height*0.5; anchors.horizontalCenter: parent.horizontalCenter; anchors.verticalCenter: parent.verticalCenter; color: "white"; }
}@
In this example, I want the rect2 to be "forever" 180 x 180.
PS: I'm a Qt Programmer. Beginner at QtQuick.