timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(funk()));
timer->start(1000);
timeedit = new QTimeEdit(this);
timeedit->setGeometry(195, 233, 405, 145);
void MainWindow::funk()
{
// QTime time = QTime::currentTime();
// QString time_text = time.toString("hh : mm : ss");
// timeedit->setTime(time);
timeedit->setDateTime(QDateTime::currentDateTime());
}
QDateTimeEdit *dateEdit = new QDateTimeEdit(QDate::currentDate());
dateEdit->setMinimumDate(QDate::currentDate().addDays(-365));
dateEdit->setMaximumDate(QDate::currentDate().addDays(365));
dateEdit->setDisplayFormat("yyyy.MM.dd");