Hi everyone:)
I need to connect a QPushButton with QTimeEdit , for create a chronometer, I'm lost in the doc...:confused:
Thank you :)
Printable View
Hi everyone:)
I need to connect a QPushButton with QTimeEdit , for create a chronometer, I'm lost in the doc...:confused:
Thank you :)
What do you want QTimeEdit to do when the button is clicked?
The time run like a chrono
See documentation of QTimer. Here's an example:
Thank you your code is perfect, but you use a current time, can I begin by the initialize time in QTimeEdit
Thank you very much.
The problem resolved
Code:
void Window::updateTime() { m_s++; if (m_s>59) { m_s=0; m_m++; } if (m_m>59) { m_m=0; m_h++; } }
Don't you think using QTime::addSecs() would be easier? ;)
yeees good idea, thank you very much:)