diff options
Diffstat (limited to 'examples/widgets/richtext/textedit/main.cpp')
-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); |