cmake: Fix cmake option display

When editing a multiple choice cmake option the
background ( the text of the current value )
would shine through. This fixes that by setting
setAutoFillBackground(true) on the editor widget

Change-Id: Ie36ea13f2d0532c375f22a33569772c3b2c604fb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Marcus Tillmanns
2022-07-04 11:20:33 +02:00
parent 0087bd492f
commit 0a77097395

View File

@@ -64,6 +64,7 @@ QWidget *ConfigModelItemDelegate::createEditor(QWidget *parent, const QStyleOpti
auto edit = new QComboBox(parent); auto edit = new QComboBox(parent);
edit->setAttribute(Qt::WA_MacSmallSize); edit->setAttribute(Qt::WA_MacSmallSize);
edit->setFocusPolicy(Qt::StrongFocus); edit->setFocusPolicy(Qt::StrongFocus);
edit->setAutoFillBackground(true);
for (const QString &s : qAsConst(data.values)) for (const QString &s : qAsConst(data.values))
edit->addItem(s); edit->addItem(s);
return edit; return edit;