36 v = mComboBox->currentData();
55 QComboBox *combo =
new QComboBox( parent );
56 combo->setMinimumContentsLength( 1 );
57 combo->setSizeAdjustPolicy( QComboBox::SizeAdjustPolicy::AdjustToMinimumContentsLengthWithIcon );
63 mComboBox = qobject_cast<QComboBox *>( editor );
68 mComboBox->view()->setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded );
69 connect( mComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
79void QgsValueMapWidgetWrapper::updateValues(
const QVariant &value,
const QVariantList & )
89 if ( mComboBox->findData( v ) == -1 )
97 mComboBox->addItem( QString( v ).prepend(
'(' ).append(
')' ), v );
100 mComboBox->setCurrentIndex( mComboBox->findData( v ) );
static QString nullRepresentation()
Returns the string used to represent the value NULL throughout QGIS.
static void populateComboBox(QComboBox *comboBox, const QVariantMap &configuration, bool skipNull)
Populates a comboBox with the appropriate entries based on a value map configuration.
static bool isNull(const QVariant &variant, bool silenceNullWarnings=false)
Returns true if the specified variant should be considered a NULL value.
static QVariant createNullVariant(QMetaType::Type metaType)
Helper method to properly create a null QVariant from a metaType Returns the created QVariant.
Represents a vector layer which manages a vector based data sets.
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.