27 mWidget->
setList( QVariantList() );
40 QFrame *ret =
new QFrame( parent );
41 ret->setFrameShape( QFrame::StyledPanel );
42 QHBoxLayout *layout =
new QHBoxLayout( ret );
43 layout->setContentsMargins( 0, 0, 0, 0 );
45 layout->addWidget(
widget );
50 ret->setMinimumSize( QSize( 320, 110 ) );
57 mWidget = qobject_cast<QgsListWidget *>( editor );
68 return mWidget ? mWidget->
valid() :
true;
71void QgsListWidgetWrapper::updateValues(
const QVariant &value,
const QVariantList & )
78 const QMetaType::Type type =
field().
type();
80 const QVariantList list = mWidget->
list();
81 if ( list.size() == 0 &&
config( QStringLiteral(
"EmptyIsNull" ) ).toBool() )
85 if ( type == QMetaType::Type::QStringList )
88 for ( QVariantList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it )
89 result.append( it->toString() );
98void QgsListWidgetWrapper::onValueChanged()
103void QgsListWidgetWrapper::updateConstraintWidgetStatus()
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.