summaryrefslogtreecommitdiffstats
path: root/src/activeqt/container/qaxselect.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-01-05 16:47:57 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-01-05 15:57:06 +0000
commitb5fe909571aff02bbd3d6cba8865c8eef36de9c7 (patch)
treef9b0b4ca795c5b9fd003d0e6ce717df214d46953 /src/activeqt/container/qaxselect.cpp
parente19cea07c1b98eeff3d77cf13abe3a6a482f2cf3 (diff)
testcon: Better adapt to High DPI screens.
Resize main window and select dialog according to available screen size. Task-number: QTBUG-50206 Change-Id: I66fa527dceb19fab87ac84ee3063f5b84e487fb4 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/activeqt/container/qaxselect.cpp')
-rw-r--r--src/activeqt/container/qaxselect.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/activeqt/container/qaxselect.cpp b/src/activeqt/container/qaxselect.cpp
index ff56dc3..b091b1c 100644
--- a/src/activeqt/container/qaxselect.cpp
+++ b/src/activeqt/container/qaxselect.cpp
@@ -47,6 +47,7 @@
#include <QtCore/QSysInfo>
#include <QtCore/QTextStream>
#include <QtCore/QRegExp>
+#include <QtWidgets/QDesktopWidget>
#include <QtWidgets/QPushButton>
#include <qt_windows.h>
@@ -289,6 +290,9 @@ QAxSelect::QAxSelect(QWidget *parent, Qt::WindowFlags flags)
d->selectUi.setupUi(this);
d->setOkButtonEnabled(false);
+ const QRect availableGeometry = QApplication::desktop()->availableGeometry(this);
+ resize(availableGeometry.width() / 4, availableGeometry.height() * 2 / 3);
+
#ifndef QT_NO_CURSOR
QApplication::setOverrideCursor(Qt::WaitCursor);
#endif