diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-02-26 12:17:35 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-02-27 10:10:04 +0100 |
commit | f75b29fbbde79d66ee539162441a007a90035b96 (patch) | |
tree | b46cc68a06ac8ab3c8b225ae8feb484facc69211 /tests/auto/widgets | |
parent | c912bde52a1b85a782db6aed8d6f9917d597f58b (diff) |
QListView: Reset style after using a temporary proxy
Amends 0242be90606b377864c6fd02d5a8e0afaf635acf, and removes unwanted
side effect of having a modified style behavior for later functions.
Pick-to: 6.5 6.4 6.2
Change-Id: If3dff0d7ab9e6c6c10e7a92d0a3eaff98fa1457f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r-- | tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp index c7bd1c934a..cb6a05c135 100644 --- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp +++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp @@ -3058,6 +3058,11 @@ void tst_QListView::spacingWithWordWrap() } }; + QStyle *oldStyle = QApplication::style(); + oldStyle->setParent(nullptr); + const auto resetStyle = qScopeGuard([oldStyle]{ + QApplication::setStyle(oldStyle); + }); QApplication::setStyle(new MyStyle(scrollBarOverlap)); const int listViewResizeCount = 200; |