on xenial help sign in
Fix "make tryApplicationWindow"
ae18a52Daniel d'Andrada
tests/qmltests/Stage/tst_ApplicationWindow.qml+2−20
@@ -53,6 +53,8 @@ Rectangle {
53 surfaceOrientationAngle: 0
53 surfaceOrientationAngle: 0
54 interactive: true
54 interactive: true
55 focus: true
55 focus: true
56+ requestedWidth: width
57+ requestedHeight: height
56 Component.onDestruction: {
58 Component.onDestruction: {
57 applicationWindowLoader.itemDestroyed = true;
59 applicationWindowLoader.itemDestroyed = true;
58 }
60 }
@@ -150,26 +152,6 @@ Rectangle {
150 }
152 }
151 }
153 }
152 }
154 }
153−
154− Button {
155− anchors { left: parent.left; right: parent.right }
156− activeFocusOnPress: false
157− text: "Rotate device \u27F3"
158− onClicked: {
159− var orientation = applicationWindowLoader.item.orientation
160− if (orientation == Qt.PortraitOrientation) {
161− orientation = Qt.LandscapeOrientation;
162− } else if (orientation == Qt.LandscapeOrientation) {
163− orientation = Qt.InvertedPortraitOrientation;
164− } else if (orientation == Qt.InvertedPortraitOrientation) {
165− orientation = Qt.InvertedLandscapeOrientation;
166− } else {
167− orientation = Qt.PortraitOrientation;
168− }
169− applicationWindowLoader.item.orientation = orientation;
170− }
171− }
172−
173 }
155 }
174 }
156 }
175
157