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 /examples/opengl/hellogl2/window.cpp | |
| 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 'examples/opengl/hellogl2/window.cpp')
| -rw-r--r-- | examples/opengl/hellogl2/window.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/opengl/hellogl2/window.cpp b/examples/opengl/hellogl2/window.cpp index 169f5e59c51..59570c83ca3 100644 --- a/examples/opengl/hellogl2/window.cpp +++ b/examples/opengl/hellogl2/window.cpp @@ -122,8 +122,8 @@ void Window::dockUndock() if (parent()) { setParent(nullptr); setAttribute(Qt::WA_DeleteOnClose); - move(QApplication::desktop()->width() / 2 - width() / 2, - QApplication::desktop()->height() / 2 - height() / 2); + move(QGuiApplication::primaryScreen()->size().width() / 2 - width() / 2, + QGuiApplication::primaryScreen()->size().height() / 2 - height() / 2); dockBtn->setText(tr("Dock")); show(); } else { |
