Skip to content
Permalink
Browse files

Default to showing calendar popup for date time widgets

  • Loading branch information
nyalldawson committed Dec 12, 2017
1 parent 897dc09 commit d901221d8670066134d8716ac859f1bcbe9deb00
@@ -146,6 +146,6 @@ void QgsDateTimeEditConfig::setConfig( const QVariantMap &config )
mDisplayFormatComboBox->setCurrentIndex( 1 );
}

mCalendarPopupCheckBox->setChecked( config.value( QStringLiteral( "calendar_popup" ), false ).toBool() );
mCalendarPopupCheckBox->setChecked( config.value( QStringLiteral( "calendar_popup" ), true ).toBool() );
mAllowNullCheckBox->setChecked( config.value( QStringLiteral( "allow_null" ), true ).toBool() );
}
@@ -66,7 +66,7 @@ void QgsDateTimeEditWrapper::initWidget( QWidget *editor )
const QString displayFormat = config( QStringLiteral( "display_format" ), QgsDateTimeFieldFormatter::defaultFormat( field().type() ) ).toString();
mQDateTimeEdit->setDisplayFormat( displayFormat );

const bool calendar = config( QStringLiteral( "calendar_popup" ), false ).toBool();
const bool calendar = config( QStringLiteral( "calendar_popup" ), true ).toBool();
mQDateTimeEdit->setCalendarPopup( calendar );
if ( calendar && mQDateTimeEdit->calendarWidget() )
{

0 comments on commit d901221

Please sign in to comment.
You can’t perform that action at this time.