From fc9d3d2f476ff3a87fccffe3cfe2544547d2bdc3 Mon Sep 17 00:00:00 2001 From: Martin Pejcoch Date: Thu, 19 Aug 2010 14:21:56 +0200 Subject: QGroupBox: Fix the focus rect of the title when using stylesheet Task-number: QTBUG-13015 Reviewed-by: Olivier Goffart --- src/gui/styles/qstylesheetstyle.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 7351a7d..4be439d 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -3048,6 +3048,13 @@ void QStyleSheetStyle::drawComplexControl(ComplexControl cc, const QStyleOptionC titleRule.configurePalette(&pal, QPalette::WindowText, QPalette::Window); drawItemText(p, labelRect, alignment, pal, gb->state & State_Enabled, gb->text, QPalette::WindowText); + + if (gb->state & State_HasFocus) { + QStyleOptionFocusRect fropt; + fropt.QStyleOption::operator=(*gb); + fropt.rect = labelRect; + drawPrimitive(PE_FrameFocusRect, &fropt, p, w); + } } return; -- cgit v0.12