summaryrefslogtreecommitdiffstats
path: root/src/widgets/qtoolbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/qtoolbox.cpp')
-rw-r--r--src/widgets/qtoolbox.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/qtoolbox.cpp b/src/widgets/qtoolbox.cpp
index 64fc148..b48f416 100644
--- a/src/widgets/qtoolbox.cpp
+++ b/src/widgets/qtoolbox.cpp
@@ -240,8 +240,9 @@ void QToolBoxButton::drawButton( QPainter *p )
fill = &cg.color( QPalette::foregroundRoleFromMode( tb->backgroundMode() ) );
int alignment = AlignLeft | AlignVCenter | ShowPrefix;
- if (!style().styleHint(QStyle::SH_UnderlineAccelerator, this))
+ if ((!style().styleHint(QStyle::SH_UnderlineAccelerator, this)) || ((style().styleHint(QStyle::SH_HideUnderlineAcceleratorWhenAltUp, this)) && (!style().acceleratorsShown()))) {
alignment |= NoAccel;
+ }
style().drawItem( p, tr, alignment, cg,
isEnabled(), 0, txt, -1, fill );