From 70d4b35b937d8a98be156b159bafbc07bfb03097 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 31 Mar 2015 11:36:30 +0200 Subject: QStyleSheetStyle: do not style the moving tab of a QTabBar QTabBar uses a palette brush on a child QWidget. But if that widget get styled, it sets the palette on it overwriting the existing palette. Make sure that no stylesheet is applied to it. [ChangeLog][QtWidgets][QTabBar] Fixed moving tab when a stylesheet is applied. Task-number: QTBUG-45173 Task-number: QTBUG-15128 Change-Id: I07aee0f369fa715d852556620c8e74bcffd836da Reviewed-by: Friedemann Kleint Reviewed-by: Giuseppe D'Angelo --- src/widgets/styles/qstylesheetstyle.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/widgets/styles') diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 4993457b32..86b5632d2e 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -2393,6 +2393,13 @@ static bool unstylable(const QWidget *w) return true; } #endif + +#ifndef QT_NO_TABBAR + if (w->metaObject() == &QWidget::staticMetaObject + && qobject_cast(w->parentWidget())) + return true; // The moving tab of a QTabBar +#endif + return false; } -- cgit v1.2.3