33 value = mComboBox->currentData();
48 return new QComboBox( parent );
53 mComboBox = qobject_cast<QComboBox *>( editor );
57 QStringList enumValues;
60 const auto constEnumValues = enumValues;
61 for (
const QString &s : constEnumValues )
63 mComboBox->addItem( s, s );
65 connect( mComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
79 mComboBox->setCurrentIndex( mComboBox->findData( value ) );
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.
virtual void enumValues(int index, QStringList &enumList) const
Returns the possible enum values of an attribute.
QgsVectorDataProvider * dataProvider() FINAL
Returns the layer's data provider, it may be nullptr.
Represents a vector layer which manages a vector based data sets.