diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-13 21:00:21 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-14 06:38:43 +0200 |
commit | 1c76aa077e9c9d74fa2314752948896f9da381ee (patch) | |
tree | ef979f532d759c9ae061c400415afd974d3edd26 /tests/manual/qscreen | |
parent | 772a10391eead51e2c7c9b50473ef0f8096cef82 (diff) |
Get rid of all usage of QApplication:desktop
Use QScreen APIs instead.
Change-Id: Ie99af94fe4292223dbb165b3f5c1b74e8fe0498b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/manual/qscreen')
-rw-r--r-- | tests/manual/qscreen/main.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/manual/qscreen/main.cpp b/tests/manual/qscreen/main.cpp index fced21f307..ec2203e1f1 100644 --- a/tests/manual/qscreen/main.cpp +++ b/tests/manual/qscreen/main.cpp @@ -228,12 +228,7 @@ void screenAdded(QScreen* screen) (screen->virtualSiblings().isEmpty() ? "none" : qPrintable(screen->virtualSiblings().first()->name()))); ScreenWatcherMainWindow *w = new ScreenWatcherMainWindow(screen); - // Set the screen; this corresponds to setScreen() for the underlying - // QWindow. This is essential when having separate X screens since the - // positioning below is not sufficient to get the windows show up on the - // desired screen. - w->setParent(qApp->desktop(screen)); - + w->setScreen(screen); w->show(); // Position the windows so that they end up at the center of the corresponding screen. |