summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qwindowsurface/tst_qwindowsurface.cpp')
-rw-r--r--tests/auto/qwindowsurface/tst_qwindowsurface.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
index 4009174..9d59c62 100644
--- a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
+++ b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
@@ -43,6 +43,7 @@
#include <QtTest/QtTest>
#include <QPainter>
#include <QPalette>
+#include <QWindowsStyle>
#ifndef Q_WS_MAC
@@ -151,6 +152,8 @@ void tst_QWindowSurface::flushOutsidePaintEvent()
#endif
ColorWidget w(0, Qt::red);
w.setGeometry(10, 100, 50, 50);
+ // prevent custom styles from messing up the background
+ w.setStyle(new QWindowsStyle);
w.show();
QApplication::processEvents();
@@ -223,6 +226,9 @@ void tst_QWindowSurface::grabWidget()
pal.setColor(QPalette::Window, QColor(Qt::red));
babyWidget.setPalette(pal);
+ // prevent custom styles from messing up the background
+ parentWidget.setStyle(new QWindowsStyle);
+
babyWidget.show();
childWidget.show();
parentWidget.show();