title: Remove Labels in qt
body: <p>I want to remove a label in Qt when program is running but i do not want to delete it.I want to remove it for several seconds and then show it.
  How can i do this?</p>
  
  <p>Sample code:</p>
  
  <pre><code>#include "mainwindow.h"
  #include "ui_mainwindow.h"
  
  #include "QTimer"
  #include "QTime"
  #include "QMessageBox"
  
  MainWindow::MainWindow(QWidget *parent) :
  QMainWindow(parent),
  ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
  
      movePicture();
  }
  
  MainWindow::~MainWindow()
  {
      delete ui;
  }
  
  void MainWindow::movePicture()
  {
      QTimer *timer = new QTimer(this);
      timer-&gt;setInterval(1000);
      timer-&gt;start();
      connect(timer,SIGNAL(timeout()),SLOT(updateloc()));
  }
  
  int MainWindow::addx()
  {
      QPoint P = ui-&gt;label-&gt;pos();
      int x = P.x() + 15;
      return x;
  }
  
  int MainWindow::decreasexEnemy()
  {
      QPoint P = ui-&gt;Enemy-&gt;pos();
      int x = P.x() - 15;
      return x;
  }
  
  void MainWindow::updateloc()
  {
      QString timestring = QTime::currentTime().toString("hh:mm:ss");
      ui-&gt;lbltime-&gt;setText(timestring);
  
      int xEnemy = ui-&gt;Enemy-&gt;pos().x();
      int x = ui-&gt;label-&gt;pos().x();
  
      if((xEnemy - x) &gt;150 )
      {
          x = addx();
          xEnemy = decreasexEnemy();
          ui-&gt;Enemy-&gt;move(xEnemy,70);
          ui-&gt;label-&gt;move(x,70);
      }
      else
      {
      }
  }
  </code></pre>
  
  <p>In else i want to remove label.</p>