Hello,

I want to add a time on my design which starts with formate 00:00:00 and my number should keep on increasing every seconds.
I tried to add the code
Qt Code:
  1. showtime()
  2. {
  3. QTime time =QTime::currentTime();
  4. QString time_text = time.toString("hh:mm:ss");
  5. ui.clock->setText(time_text);
  6. }
  7. constructor()
  8. {
  9. QTimer *timer = new QTimer(this);
  10. connect(timer,SIGNAL(timeout()),this,SLOT(showtime()));
  11. timer->start();
  12. }
To copy to clipboard, switch view to plain text mode 

but I am getting my system time.
I want it should start from zero and keep on increasing every second.
Please let me know some solution.