diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-03-24 17:24:16 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-03-27 16:50:05 +0000 |
commit | acc629c1e82d19a4153bf2db821f2a34fb1e94a3 (patch) | |
tree | aa37617fc4442b9653d34ba77a367a23383936bc /examples/corelib/threads/queuedcustomtype | |
parent | 10db31f933f696b2e61dde640f09c57989617011 (diff) |
Examples: replace QDesktopWidget::availableGeometry()/screenGeometry()
QDesktopWidget::availableGeometry()/screenGeometry() was deprecated in
5.11 and replaced with QScreen::availableGeometry()/screenGeometry()
Change-Id: I912a133971c41196f8f49754c28ce92711ff42bb
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'examples/corelib/threads/queuedcustomtype')
-rw-r--r-- | examples/corelib/threads/queuedcustomtype/window.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/corelib/threads/queuedcustomtype/window.cpp b/examples/corelib/threads/queuedcustomtype/window.cpp index 7b9004d868..2cefba1e17 100644 --- a/examples/corelib/threads/queuedcustomtype/window.cpp +++ b/examples/corelib/threads/queuedcustomtype/window.cpp @@ -108,9 +108,8 @@ void Window::loadImage() void Window::loadImage(const QImage &image) { - QDesktopWidget desktop; QImage useImage; - QRect space = desktop.availableGeometry(); + QRect space = QGuiApplication::primaryScreen()->availableGeometry(); if (image.width() > 0.75*space.width() || image.height() > 0.75*space.height()) useImage = image.scaled(0.75*space.width(), 0.75*space.height(), Qt::KeepAspectRatio, Qt::SmoothTransformation); |