Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.2.0 Beta1
-
None
-
x11, latest qt5-release
-
70c37506e9e7c7228ca823cff0f75a5813f3bcb7
Description
Run the following example with Qt 5.2 and only part of the red rectangle is visible on startup. If one resizes the window, the red rectangle jumps to the correct location.
import QtQuick 2.1 import QtQuick.Window 2.1 Window { id: window width: 320 height: 240 // doesn't matter if it's an alias or not readonly property real contentWidth: window.width readonly property alias contentHeight: window.height Rectangle { id: container width: window.contentWidth height: window.contentHeight Rectangle { color: "red" x: container.width / 2 - width / 2 y: container.height / 2 - height / 2 width: window.contentWidth height: window.contentHeight Text { anchors.right: parent.right anchors.bottom: parent.bottom text: qsTr("(%1,%2 %3x%4)").arg(parent.x).arg(parent.y).arg(parent.width).arg(parent.height) } } } }