mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-02 00:02:12 -05:00
Editor widgets: Show NULL value on numeric line edit
This commit is contained in:
parent
db6a5a9d57
commit
3f8a860503
@ -95,7 +95,11 @@ void QgsTextEditWrapper::initWidget( QWidget* editor )
|
|||||||
mLineEdit->setValidator( new QgsFieldValidator( mLineEdit, field() ) );
|
mLineEdit->setValidator( new QgsFieldValidator( mLineEdit, field() ) );
|
||||||
|
|
||||||
QgsFilterLineEdit *fle = qobject_cast<QgsFilterLineEdit*>( mLineEdit );
|
QgsFilterLineEdit *fle = qobject_cast<QgsFilterLineEdit*>( mLineEdit );
|
||||||
if ( fle && !( field().type() == QVariant::Int || field().type() == QVariant::Double || field().type() == QVariant::LongLong || field().type() == QVariant::Date ) )
|
if ( field().type() == QVariant::Int || field().type() == QVariant::Double || field().type() == QVariant::LongLong || field().type() == QVariant::Date )
|
||||||
|
{
|
||||||
|
mLineEdit->setPlaceholderText( QSettings().value( "qgis/nullValue", "NULL" ).toString() );
|
||||||
|
}
|
||||||
|
else if ( fle )
|
||||||
{
|
{
|
||||||
fle->setNullValue( QSettings().value( "qgis/nullValue", "NULL" ).toString() );
|
fle->setNullValue( QSettings().value( "qgis/nullValue", "NULL" ).toString() );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user