title: PyQT - modifying main window widgets from other functions
body: <p>A PyQT beginner question.  I'm wondering how to do something like the following - modify widgets in the main window from outside the main window class.  Like so:</p>
  
  <pre><code>class MainWindow(QtGui.QMainWindow):    
  
      def __init__(self, parent=None):
  
          super(MainWindow,self).__init__(parent)
  
          self.ui = Ui_MainWindow()        
          self.ui.setupUi(self)
  
          self.ui.progressBar.setMaximum(100)
          self.ui.progressBar.setMinimum(0)
          self.ui.progressBar.setValue(0)
  
          self.connect(self.ui.pushButton, QtCore.SIGNAL('clicked()'), self.slotDoStuff)
  
      def slotDoStuff(self):
          AnotherFunction()
  
  
  def AnotherFunction():    
      modify progress bar here...
  </code></pre>
  
  <p>Is there a way to do something like this? I'd like to subclass the event handlers for various main window actions and not have them all in the MainWindow class.  Thanks!</p>