diff widgets/ModelDataTableDialog.cpp @ 1478:d39db4673676 by-id

Fix a number of Qt deprecation warnings
author Chris Cannam
date Wed, 03 Jul 2019 08:55:02 +0100
parents 0ded54e94332
children 9bf8aa2916e9
line wrap: on
line diff
--- a/widgets/ModelDataTableDialog.cpp	Tue Jul 02 19:05:45 2019 +0100
+++ b/widgets/ModelDataTableDialog.cpp	Wed Jul 03 08:55:02 2019 +0100
@@ -30,7 +30,7 @@
 #include <QDialogButtonBox>
 #include <QHeaderView>
 #include <QApplication>
-#include <QDesktopWidget>
+#include <QScreen>
 #include <QAction>
 #include <QToolBar>
 
@@ -144,8 +144,8 @@
     grid->addWidget(bb, 2, 0);
     grid->setRowStretch(2, 0);
     
-    QDesktopWidget *desktop = QApplication::desktop();
-    QRect available = desktop->availableGeometry();
+    QScreen *screen = QGuiApplication::primaryScreen();
+    QRect available = screen->availableGeometry();
 
     int width = available.width() / 3;
     int height = available.height() / 2;