forked from qt-creator/qt-creator
ThemeEditor: Preselect widget style on edit
Change-Id: I9992d595fc5995c9dbd9f244744b80f93548e942 Reviewed-by: Thorben Kroeger <thorbenkroeger@gmail.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
0c95024c9b
commit
ef0eca53d7
@@ -134,6 +134,7 @@ QWidget *ThemeSettingsItemDelegate::createEditor(QWidget *parent, const QStyleOp
|
|||||||
QMetaEnum e = Theme::staticMetaObject.enumerator(Theme::staticMetaObject.indexOfEnumerator("WidgetStyle"));
|
QMetaEnum e = Theme::staticMetaObject.enumerator(Theme::staticMetaObject.indexOfEnumerator("WidgetStyle"));
|
||||||
for (int i = 0, total = e.keyCount(); i < total; ++i)
|
for (int i = 0, total = e.keyCount(); i < total; ++i)
|
||||||
cb->addItem(QLatin1String(e.key(i)));
|
cb->addItem(QLatin1String(e.key(i)));
|
||||||
|
cb->setCurrentIndex(model->m_widgetStyle);
|
||||||
connect(cb, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
|
connect(cb, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
|
||||||
this, [this, cb]() {
|
this, [this, cb]() {
|
||||||
ThemeSettingsItemDelegate *me = const_cast<ThemeSettingsItemDelegate *>(this);
|
ThemeSettingsItemDelegate *me = const_cast<ThemeSettingsItemDelegate *>(this);
|
||||||
|
Reference in New Issue
Block a user