Problem with start timer
-
hi
every time when i press the push Button Timer will Add 1 sec
I Want To Start Timer And Goes Up Like Stopwatch
@{
ui->setupUi(this);
_second=0;
_time.setHMS(0,0,0,0);
startTimer(1000);
}
what im doing wrong?
MainWindow::~MainWindow()
{
delete ui;
}void MainWindow::on_timerEvent_clicked()
{
_second++;
QTime t= _time.addSecs(_second);
ui->LCurrenTtime->setText(t.toString());
}
@ -
Hi,
Have a look at the "Digital Clock Example", it should give you some hints to go further.
-
What is the expected behavior and what is actually happening?