summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtabbar
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-11-17 12:22:11 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-11-17 12:22:11 (GMT)
commit4c7d869bc103de36b5a97dd50f323f7af680656e (patch)
tree4a97b51a7678ad0fd220ae47d97d6ed1e806ad4f /tests/auto/qtabbar
parent5c4fce677e58b17fdc7ee19803b9939f56530b06 (diff)
downloadQt-4c7d869bc103de36b5a97dd50f323f7af680656e.zip
Qt-4c7d869bc103de36b5a97dd50f323f7af680656e.tar.gz
Qt-4c7d869bc103de36b5a97dd50f323f7af680656e.tar.bz2
Fix for tabwidget elidemode being overriden by stylesheet
Setting a stylesheet or reparenting a widget into a widget using style sheet would cause the elidemode to be reset. Instead we now keep the elidemode whenever it has been explicitly set by the user rather than querying from the style again. Task-number: QT-1914 Reviewed-by: ogoffart
Diffstat (limited to 'tests/auto/qtabbar')
-rw-r--r--tests/auto/qtabbar/tst_qtabbar.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qtabbar/tst_qtabbar.cpp b/tests/auto/qtabbar/tst_qtabbar.cpp
index 2db72b9..78c65ae 100644
--- a/tests/auto/qtabbar/tst_qtabbar.cpp
+++ b/tests/auto/qtabbar/tst_qtabbar.cpp
@@ -273,6 +273,9 @@ void tst_QTabBar::setElideMode()
if (tabElideMode != -128)
tabBar.setElideMode(Qt::TextElideMode(tabElideMode));
QTEST(int(tabBar.elideMode()), "expectedMode");
+ // Make sure style sheet does not override user set mode
+ tabBar.setStyleSheet("QWidget { background-color: #ABA8A6;}");
+ QTEST(int(tabBar.elideMode()), "expectedMode");
}
void tst_QTabBar::setUsesScrollButtons_data()