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/qcommonstyle.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/qcommonstyle.cpp')
-rw-r--r-- | src/widgets/styles/qcommonstyle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index a52e14eaf9..cc7af2ccc8 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -2222,7 +2222,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, } if (!cb->currentText.isEmpty() && !cb->editable) { proxy()->drawItemText(p, editRect.adjusted(1, 0, -1, 0), - visualAlignment(cb->direction, Qt::AlignLeft | Qt::AlignVCenter), + visualAlignment(cb->direction, cb->textAlignment), cb->palette, cb->state & State_Enabled, cb->currentText); } p->restore(); |