Preferences DOB QDateEdit locale fix

This commit is contained in:
Mark Watkins 2011-09-12 15:18:31 +10:00
parent 69e16f11a6
commit f1437da8cd

View File

@ -101,6 +101,13 @@ PreferencesDialog::PreferencesDialog(QWidget *parent,Profile * _profile) :
row++;
}
}
QLocale locale=QLocale::system();
QString shortformat=locale.dateFormat(QLocale::ShortFormat);
if (!shortformat.toLower().contains("yyyy")) {
shortformat.replace("yy","yyyy");
}
ui->dobEdit->setDisplayFormat(shortformat);
ui->profileTab->setTabOrder(ui->firstNameEdit,ui->lastNameEdit);
ui->profileTab->setTabOrder(ui->lastNameEdit,ui->addressEdit);
ui->profileTab->setTabOrder(ui->addressEdit,ui->genderMale);