summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp')
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 489edb703c..7edca2017d 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -8855,6 +8855,12 @@ void tst_QWidget::translucentWidget()
QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort);
QCOMPARE(actual.size(),expected.size());
QCOMPARE(actual,expected);
+
+ const QWindow *window = label.windowHandle();
+ const QSurfaceFormat translucentFormat = window->requestedFormat();
+ label.setAttribute(Qt::WA_TranslucentBackground, false);
+ const QSurfaceFormat opaqueFormat = window->requestedFormat();
+ QVERIFY(translucentFormat != opaqueFormat);
}
class MaskResizeTestWidget : public QWidget