mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added support for icons in combo box editor
This commit is contained in:
parent
8acab71742
commit
2807a8d2f8
@ -87,7 +87,10 @@ void PdmUiComboBoxEditor::configureAndUpdateUi(const QString& uiConfigName)
|
|||||||
m_comboBox->clear();
|
m_comboBox->clear();
|
||||||
if (!options.isEmpty())
|
if (!options.isEmpty())
|
||||||
{
|
{
|
||||||
m_comboBox->addItems(PdmOptionItemInfo::extractUiTexts(options));
|
for (int i = 0; i < options.size(); i++)
|
||||||
|
{
|
||||||
|
m_comboBox->addItem(options[i].icon, options[i].optionUiText);
|
||||||
|
}
|
||||||
m_comboBox->setCurrentIndex(field()->uiValue().toInt());
|
m_comboBox->setCurrentIndex(field()->uiValue().toInt());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user