l'anno corrente viene selezionato automaticamente per mostrare i rinnovi
This commit is contained in:
parent
9a7a3d7636
commit
3a7e836899
|
@ -20,6 +20,12 @@ RenewalTab::RenewalTab(QWidget *parent) :
|
|||
const int anno = query.value(record.indexOf("anno")).toInt();
|
||||
ui->renewalYear->addItem(QString::number(anno), anno);
|
||||
}
|
||||
|
||||
int current_year;
|
||||
QDate::currentDate().getDate(¤t_year, nullptr, nullptr);
|
||||
int current_year_index = ui->renewalYear->findData(current_year);
|
||||
if (current_year_index != -1) ui->renewalYear->setCurrentIndex(current_year_index);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue