i want put the real time on qt, but non static
I have this code:
QDateTime dateTime = dateTime.currentDateTime();
QString dateTimeString = dateTime.toString("yyyy-MM-dd hh-mm-ss");
ui->data->setText(dateTimeString);
but it shows only a static dateTime and i want the real dateTime (change every second)
Done!
Header:
Source: