title: Time delay using QThread showing build issues
body: <p>I am trying to implement the sleep function of QT Qthread, so I declared it in the header file as--</p>
  
  <pre><code>namespace Ui {
      class MainWindow;
  }
  class MainWindow : public QMainWindow {
      Q_OBJECT
  public:
      MainWindow(QWidget *parent = 0);
      ~MainWindow();
      static void sleep(unsigned long secs){QThread::sleep(secs);}
  protected:
      void changeEvent(QEvent *e);
  private:
      Ui::MainWindow *ui;
  private slots:
      void on_pushButton_clicked();
  };
  </code></pre>
  
  <p>and in my source code what I am doing is after connecting to a database, I want a label to change background color (sort of like a glowing effect), so I tried calling the sleep function from inside a while(true) loop.</p>
  
  <pre><code>while(db.open())
  {
      MainWindow::sleep(13);
  
      qDebug()&lt;&lt;"Success ";
      ui-&gt;glow_label-&gt;setStyleSheet("QLabel {background-color: rgb(0, 255, 0);}");
  
      MainWindow::sleep(5);
      ui-&gt;glow_label-&gt;setStyleSheet("QLabel {background-color: rgb(0, 85, 255);}");
  }
  </code></pre>
  
  <p>But it shows error during build time--></p>
  
  <p>/usr/local/Trolltech/Qt-4.8.4/include/QtCore/qthread.h:115: error: ‘static void QThread::sleep(long unsigned int)’ is protected
  /home/aj/MY_QT_WORK/timer_test/mainwindow.h:22: error: within this context</p>
  
  <p>Any ideas where I am doing wrong ???</p>