summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r--src/widgets/kernel/qwidget.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index a29a265e5a..76218a9eb3 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1266,8 +1266,7 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
#elif defined(Q_WS_QPA)
if (desktopWidget) {
int screen = desktopWidget->d_func()->topData()->screenIndex;
- QPlatformIntegration *platform = QGuiApplicationPrivate::platformIntegration();
- platform->moveToScreen(q->windowHandle(), screen);
+ q->windowHandle()->setScreen(QGuiApplication::screens().value(screen, 0));
}
#else
Q_UNUSED(desktopWidget);