diff options
author | Andy Shaw <andy.shaw@qt.io> | 2020-05-06 15:41:56 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2020-05-15 05:00:10 +0200 |
commit | f468f76455c91cf1c5b477ab9348337522b4d9aa (patch) | |
tree | 26f18ae1276d2867e2692b434cf3cb4e2449f58a /src/widgets/styles/qstylesheetstyle.cpp | |
parent | 6028e16b8693c8c7403fd4e5341c52beb33e5613 (diff) |
Add an option to set the alignment of the text in QComboBox
Change-Id: Ic9dca8864643302b2b3ff7dbd86260efdb0ab1d5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/styles/qstylesheetstyle.cpp')
-rw-r--r-- | src/widgets/styles/qstylesheetstyle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 32f86e5b5a..13db17fbfb 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -3894,7 +3894,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q if (!cb->currentText.isEmpty() && !cb->editable) { QPalette styledPalette(cb->palette); rule.configurePalette(&styledPalette, QPalette::Text, QPalette::Base); - drawItemText(p, editRect.adjusted(0, 0, 0, 0), Qt::AlignLeft | Qt::AlignVCenter, styledPalette, + drawItemText(p, editRect.adjusted(0, 0, 0, 0), cb->textAlignment, styledPalette, cb->state & State_Enabled, cb->currentText, QPalette::Text); } p->restore(); |