aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-06-15 13:24:51 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-07-20 12:12:48 +0000
commit8231b5b0eb4afa385392fbe0259f9fecdb459907 (patch)
treefdd4b947990b29d9f2e21858ce11a32b646b33ab /tests
parentdb8b4aa1f1d12430168f818ed259b47654ec715d (diff)
testbench: center the window upon completion instead of using bindings
The x/y bindings to screen center cause troubles when moving the window between screens. At least on OS X, the x/y bindings prevent moving the window to a second screen (it snaps back). Change-Id: I238e278c5338e926633be518143f22b5b18a4422 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/testbench/main.qml7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/manual/testbench/main.qml b/tests/manual/testbench/main.qml
index bbeb795b..2fdc52af 100644
--- a/tests/manual/testbench/main.qml
+++ b/tests/manual/testbench/main.qml
@@ -48,11 +48,14 @@ import QtQuick.Controls.Universal 2.0
ApplicationWindow {
id: window
visible: true
- x: Screen.width / 2 - width / 2
- y: Screen.height / 2 - height / 2
width: 750
height: 1000
+ Component.onCompleted: {
+ x = Screen.width / 2 - width / 2
+ y = Screen.height / 2 - height / 2
+ }
+
Material.theme: themeSwitch.checked ? Material.Dark : Material.Light
Universal.theme: themeSwitch.checked ? Universal.Dark : Universal.Light