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/tools/codecs/previewform.cpp | |
parent | 4a7e7103e713448c05d9d30cab8b7e52406b46a6 (diff) | |
parent | 6f27bb135246b7fe9d11ba58e05d2b7661bc2080 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ia1da879a7bd8f71a649661a1844144dd67d60b3a
Diffstat (limited to 'examples/widgets/tools/codecs/previewform.cpp')
-rw-r--r-- | examples/widgets/tools/codecs/previewform.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/tools/codecs/previewform.cpp b/examples/widgets/tools/codecs/previewform.cpp index ec75ebb9fa..f48651335a 100644 --- a/examples/widgets/tools/codecs/previewform.cpp +++ b/examples/widgets/tools/codecs/previewform.cpp @@ -52,12 +52,12 @@ #include <QApplication> #include <QComboBox> -#include <QDesktopWidget> #include <QDialogButtonBox> #include <QGridLayout> #include <QLabel> #include <QPlainTextEdit> #include <QPushButton> +#include <QScreen> #include <QTextCodec> #include <QTextStream> @@ -183,7 +183,7 @@ PreviewForm::PreviewForm(QWidget *parent) mainLayout->addWidget(statusLabel, 2, 0, 1, 2); mainLayout->addWidget(buttonBox, 3, 0, 1, 2); - const QRect screenGeometry = QApplication::desktop()->screenGeometry(this); + const QRect screenGeometry = screen()->geometry(); resize(screenGeometry.width() * 2 / 5, screenGeometry.height() / 2); } |