Commit ef0eca53 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

ThemeEditor: Preselect widget style on edit



Change-Id: I9992d595fc5995c9dbd9f244744b80f93548e942
Reviewed-by: default avatarThorben Kroeger <thorbenkroeger@gmail.com>
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 0c95024c
......@@ -134,6 +134,7 @@ QWidget *ThemeSettingsItemDelegate::createEditor(QWidget *parent, const QStyleOp
QMetaEnum e = Theme::staticMetaObject.enumerator(Theme::staticMetaObject.indexOfEnumerator("WidgetStyle"));
for (int i = 0, total = e.keyCount(); i < total; ++i)
cb->addItem(QLatin1String(e.key(i)));
cb->setCurrentIndex(model->m_widgetStyle);
connect(cb, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
this, [this, cb]() {
ThemeSettingsItemDelegate *me = const_cast<ThemeSettingsItemDelegate *>(this);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment