summaryrefslogtreecommitdiffstats
path: root/examples/corelib/threads/queuedcustomtype/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/corelib/threads/queuedcustomtype/window.cpp')
-rw-r--r--examples/corelib/threads/queuedcustomtype/window.cpp3
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);