QListView: Reset style after using a temporary proxy
Amends 0242be90606b377864c6fd02d5a8e0afaf635acf, and removes unwanted side effect of having a modified style behavior for later functions. Change-Id: If3dff0d7ab9e6c6c10e7a92d0a3eaff98fa1457f Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit f75b29fbbde79d66ee539162441a007a90035b96) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
a44e0ca93c
commit
bae383002a
@ -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));
|
QApplication::setStyle(new MyStyle(scrollBarOverlap));
|
||||||
|
|
||||||
const int listViewResizeCount = 200;
|
const int listViewResizeCount = 200;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user