title: Python PySide and Progress Bar Threading
body: <p>I have this code:</p>
  
  <pre><code>from PySide import QtCore, QtGui
  import time
  
  class Ui_Dialog(object):
      def setupUi(self, Dialog):
          Dialog.setObjectName("Dialog")
          Dialog.resize(400, 133)
          self.progressBar = QtGui.QProgressBar(Dialog)
          self.progressBar.setGeometry(QtCore.QRect(20, 10, 361, 23))
          self.progressBar.setProperty("value", 24)
          self.progressBar.setObjectName("progressBar")
          self.pushButton = QtGui.QPushButton(Dialog)
          self.pushButton.setGeometry(QtCore.QRect(20, 40, 361, 61))
          self.pushButton.setObjectName("pushButton")
  
          self.retranslateUi(Dialog)
          QtCore.QMetaObject.connectSlotsByName(Dialog)
  
      def retranslateUi(self, Dialog):
          Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Dialog", None, QtGui.QApplication.UnicodeUTF8))
          self.pushButton.setText(QtGui.QApplication.translate("Dialog", "PushButton", None, QtGui.QApplication.UnicodeUTF8))
          self.progressBar.setValue(0)
          self.pushButton.clicked.connect(self.progress)
  
      def progress(self):
          self.progressBar.minimum = 1
          self.progressBar.maximum = 100
          for i in range(1, 101):
              self.progressBar.setValue(i)
              time.sleep(0.1)
  
  if __name__ == "__main__":
      import sys
      app = QtGui.QApplication(sys.argv)
      Dialog = QtGui.QDialog()
      ui = Ui_Dialog()
      ui.setupUi(Dialog)
      Dialog.show()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>I want to have the progress bar in a separate thread, so it doesn't freeze up the application, but I can't seem to find how to do so.</p>
  
  <p>Can anyone please help?</p>