summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
index 7b914512ab..72ea2ae31a 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -272,6 +272,9 @@ class tst_QGraphicsItem : public QObject
{
Q_OBJECT
+public:
+ static void initMain();
+
private slots:
void construction();
void constructionWithParent();
@@ -474,6 +477,14 @@ private:
QTouchDevice *m_touchDevice = nullptr;
};
+void tst_QGraphicsItem::initMain()
+{
+#ifdef Q_OS_WIN
+ // Ensure minimum size constraints of framed windows on High DPI screens
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+#endif
+}
+
void tst_QGraphicsItem::construction()
{
for (int i = 0; i < 7; ++i) {