title: Updating PyQt4 Progress bar within for loop - Python 2.7
body: <p>I augmented <a href="https://pythonspot.com/en/qt4-progressbar/" rel="nofollow noreferrer">this example</a> to allow my user to know what part of the process the program is in when it is handling a RAM intensive and iterative process in a For Loop. I find that the following script works when it is just asking to print the count value and wait a few seconds, but it doesn't for more intensive functions.</p>
  
  <pre><code># from https://pythonspot.com/en/qt4-progressbar/
  
  import sys
  from PyQt4.QtGui import *
  from PyQt4.QtCore import *
  from PyQt4.QtCore import pyqtSlot,SIGNAL,SLOT
  import time
  
  class QProgBar(QProgressBar):
  
      value = 0
  
      @pyqtSlot()
      def increaseValue(progressBar):
          progressBar.setValue(progressBar.value)
          progressBar.value = progressBar.value+1
  
  # Create an PyQT4 application object.
  a = QApplication(sys.argv)       
  
  # The QWidget widget is the base class of all user interface objects in PyQt4.
  w = QWidget()
  
  # Set window title  
  w.setWindowTitle("PyQT4 Progressbar @ pythonspot.com ") 
  
  # Create progressBar. 
  bar = QProgBar(w)
  bar.resize(320,50)    
  bar.setValue(0)
  
  
  bar.setAlignment(Qt.AlignCenter)
  bar.move(0,50)
  
  label = QLabel("test",w)
  label.setStyleSheet("QLabel { font-size: 20px }")
  label.setAlignment(Qt.AlignCenter)
  label.move(0,10)
  
  # create timer for progressBar
  '''timer = QTimer()
  bar.connect(timer,SIGNAL("timeout()"),bar,SLOT("increaseValue()"))
  timer.start(400)'''
  
  # Show window
  w.show()
  
  for i in range(0,100):
      print(i) 
      ### Do action
      bar.setValue(i)
      time.sleep(0.5)
  
  sys.exit(a.exec_())
  </code></pre>
  
  <p>Is there anything I can do to make this work for more intense actions? Does anyone know of a better package for progress bars that I can insert within a for loop easily?</p>
  
  <p>I am new to GUI development in general, and I really only need simple UI's.</p>
  
  <p>Thanks in advance for any help you can offer :)</p>