title: Trouble with progressbar in QT
body: <p>i m facing problem in giving animation to progressbar in QT.</p>
  
  <p>where is the mistake in the following code, i am getting continues progress bar, but its not animating </p>
  
  <pre><code>  QApplication a(argc, argv);
  
  QProgressDialog *dialog = new QProgressDialog();
  
  
  QProgressBar *pbar = new QProgressBar(dialog);
  
  pbar-&gt;setMinimum(0);
  pbar-&gt;setMaximum(0);
  pbar-&gt;setTextVisible(false);
  
  QDesktopWidget *desktop = QApplication::desktop();
  QRect rect = desktop-&gt;geometry();
  
  pbar-&gt;setGeometry(rect.left(),rect.top(),rect.right(),rect.bottom()-300);
  
  pbar-&gt;show();
  
  
  dialog-&gt;setBar(pbar);
  
  dialog-&gt;showMaximized(); 
  dialog-&gt;exec();   
  return a.exec();
  </code></pre>