Is void Dialog:: prgCtrl(); declared as slot ?
void Dialog::prgCtrl()
{
qDebug() << "update" << dt;
ui->m_hours->setValue(dt.time().hour());
ui->m_minutes->setValue(dt.time().minute());
ui->m_seconds->setValue(dt.time().second());
}
void Dialog::prgCtrl()
{
dt= QDateTime::currentDateTime();
qDebug() << "update" << dt;
ui->m_hours->setValue(dt.time().hour());
ui->m_minutes->setValue(dt.time().minute());
ui->m_seconds->setValue(dt.time().second());
}
To copy to clipboard, switch view to plain text mode
Can you see the debug message ?
Another thing is that you can set one second interval for timer, IMHO there is no need for more frequent ui updates in that case.
Bookmarks