summaryrefslogtreecommitdiffstats
path: root/examples/widgets/richtext
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-10-17 09:41:36 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-10-17 09:41:36 +0200
commit02164e0288f714f1ea93afb32548548686773d1d (patch)
treed7ed16267f7659af63e78c8de8915ed0208b598b /examples/widgets/richtext
parent4a7e7103e713448c05d9d30cab8b7e52406b46a6 (diff)
parent6f27bb135246b7fe9d11ba58e05d2b7661bc2080 (diff)
Merge remote-tracking branch 'origin/dev' into wip/cmake
Diffstat (limited to 'examples/widgets/richtext')
-rw-r--r--examples/widgets/richtext/textedit/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/richtext/textedit/main.cpp b/examples/widgets/richtext/textedit/main.cpp
index aef186aa77..256d183811 100644
--- a/examples/widgets/richtext/textedit/main.cpp
+++ b/examples/widgets/richtext/textedit/main.cpp
@@ -51,9 +51,9 @@
#include "textedit.h"
#include <QApplication>
-#include <QDesktopWidget>
#include <QCommandLineParser>
#include <QCommandLineOption>
+#include <QScreen>
int main(int argc, char *argv[])
{
@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
TextEdit mw;
- const QRect availableGeometry = QApplication::desktop()->availableGeometry(&mw);
+ const QRect availableGeometry = mw.screen()->availableGeometry();
mw.resize(availableGeometry.width() / 2, (availableGeometry.height() * 2) / 3);
mw.move((availableGeometry.width() - mw.width()) / 2,
(availableGeometry.height() - mw.height()) / 2);