diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-10-17 09:41:36 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-10-17 09:41:36 +0200 |
commit | 02164e0288f714f1ea93afb32548548686773d1d (patch) | |
tree | d7ed16267f7659af63e78c8de8915ed0208b598b /examples/widgets/richtext/textedit | |
parent | 4a7e7103e713448c05d9d30cab8b7e52406b46a6 (diff) | |
parent | 6f27bb135246b7fe9d11ba58e05d2b7661bc2080 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ia1da879a7bd8f71a649661a1844144dd67d60b3a
Diffstat (limited to 'examples/widgets/richtext/textedit')
-rw-r--r-- | examples/widgets/richtext/textedit/main.cpp | 4 |
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); |