diff options
author | Martin Pejcoch <martin.pejcoch@nokia.com> | 2010-08-19 12:21:56 (GMT) |
---|---|---|
committer | Qt Commercial Integration <QtCommercial@digia.com> | 2012-01-31 10:25:00 (GMT) |
commit | f1576996a561849e2ab9f2ae4d93f50c470a679a (patch) | |
tree | 8a297a9ea4b5cf02bd4160de105c2e1a29b9d559 /src | |
parent | ea0dfd8bb37ba9e279ae760563044df23c733804 (diff) | |
download | Qt-f1576996a561849e2ab9f2ae4d93f50c470a679a.zip Qt-f1576996a561849e2ab9f2ae4d93f50c470a679a.tar.gz Qt-f1576996a561849e2ab9f2ae4d93f50c470a679a.tar.bz2 |
QGroupBox: Fix the focus rect of the title when using stylesheet
Task-number: QTBUG-13015
Reviewed-by: Olivier Goffart
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/styles/qstylesheetstyle.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 1efe339..08c3739 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; |