summaryrefslogtreecommitdiffstats
path: root/examples/activeqt/mediaplayer/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/activeqt/mediaplayer/main.cpp')
-rw-r--r--examples/activeqt/mediaplayer/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/activeqt/mediaplayer/main.cpp b/examples/activeqt/mediaplayer/main.cpp
index c20f262..2f84d83 100644
--- a/examples/activeqt/mediaplayer/main.cpp
+++ b/examples/activeqt/mediaplayer/main.cpp
@@ -51,7 +51,7 @@
#include <QApplication>
#include <QMessageBox>
#include <QMainWindow>
-#include <QDesktopWidget>
+#include <QScreen>
#include <QVariant>
#include <QSettings>
#include <QFileDialog>
@@ -90,7 +90,7 @@ MainWindow::MainWindow()
const QByteArray restoredGeometry = settings.value(QLatin1String(geometryKey)).toByteArray();
if (restoredGeometry.isEmpty() || !restoreGeometry(restoredGeometry)) {
- const QRect availableGeometry = QApplication::desktop()->availableGeometry(this);
+ const QRect availableGeometry = screen()->availableGeometry();
const QSize size = (availableGeometry.size() * 4) / 5;
resize(size);
move(availableGeometry.center() - QPoint(size.width(), size.height()) / 2);