summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorWang Chuan <ouchuanm@outlook.com>2020-10-25 21:38:19 +0800
committerWang Chuan <ouchuanm@outlook.com>2020-11-02 20:27:00 +0800
commit231be2e0a192f16141c12888e126bb2284b29b9f (patch)
tree468cea90e50fa7b1b8228a902ee2178fbaeddff2 /src/widgets/widgets
parentbe37937614c09449f83b07c4023206f2c225c31b (diff)
QCombobox: propagate the palette to the embedded line edit
Let the new created embedded QLineEdit use the palette from QCombobox, when calling [setEditable(true)] Fixes: QTBUG-81533 Pick-to: 5.15 Change-Id: Ia406dd8122a348e185f0e94d027646b95eeaa76e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qcombobox.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index db65285aef..f2baa5f8e8 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -1781,6 +1781,7 @@ void QComboBox::setEditable(bool editable)
view()->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
}
QLineEdit *le = new QLineEdit(this);
+ le->setPalette(palette());
setLineEdit(le);
} else {
if (style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, this)) {