title: Qt QLCDNumber QTimer Digital Clock Tick
body: <p>I am trying to create a digital clock. However, my purpose is not getting the currentTime(). Instead, I am defining my own time and incrementing the time from there onwards.</p>
  
  <p>However, in my codes, I am able to call tickSimulation(), but the clock timer won't start ticking. It just stucks at 11:00:00. Is declaring addSecs(1000) correct?</p>
  
  <p>Please help. Thanks!</p>
  
  <pre><code>StatusBar::StatusBar()
  {
      createButtons();
      time = new QTime(11, 0, 0);
  };
  
  void StatusBar::createButtons()
  {
      ...
      lcdSimulation = new QLCDNumber;
      lcdSimulation-&gt;setNumDigits(8);
      simulationTimer = new QTimer;
      simulationTimer-&gt;start(1000);
      QObject::connect(simulationTimer, SIGNAL(timeout()), this, SLOT(tickSimulation()));
      addWidget(lcdSimulation);
      ...
  }
  
  void StatusBar::tickSimulation()
  {
      QString text = time-&gt;toString(Qt::TextDate);
      if((time-&gt;second() % 2) == 0)
          text[2] = ' ';
      lcdSimulation-&gt;display(text);
      time-&gt;addSecs(1000);
  };
  </code></pre>