ramin.lich
30th August 2014, 19:35
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);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_timerEvent_clicked()
{
_second++;
QTime t= _time.addSecs(_second);
ui->LCurrenTtime->setText(t.toString());
}
what im doing wrong?
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);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_timerEvent_clicked()
{
_second++;
QTime t= _time.addSecs(_second);
ui->LCurrenTtime->setText(t.toString());
}
what im doing wrong?