I need `ProgressBar` widget in my\_app ,When I click on the `pushButton`, I can not call `def call_progressBar2(self,value1)` in `def download (self)`.
Can anyone help me?

main.py

```
from g import Ui_MainWindow
from PyQt4 import QtCore, QtGui
import sys
import time
from b import classb

class MainWindow(QtGui.QMainWindow):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        instance_b=classb()
        tvt= self.call_progressBar2(self)
        QtCore.QObject.connect(self.ui.pushButton1, QtCore.SIGNAL("clicked()"), \
                       lambda: instance_b.download(tvt))## I need  help here.

    def call_progressBar2(self,value1): 
        while True:
            time.sleep(0.05)
            value = self.ui.progressBar.value() + 1
            self.ui.progressBar.setValue(value)
            QtGui.qApp.processEvents()
            if (not self.ui._active or
                value >= self.progressBar.maximum()):
                if value==value1:
                    break
        self.ui._active = False            

if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)
    myapp = MainWindow()
    myapp.show()
    sys.exit(app.exec_())

```

b.py

```
import time
from PyQt4 import QtCore, QtGui

class classb (object):
    def __init__(self, parent=None):
       self.parent=parent

#I need call def call_progressBar2() here.
    def download(self):
       from main import MainWindow 
       instance_m= MainWindow
       print 'a'
       instance_m.call_progressBar2(20)
       print 'b'
       instance_m.call_progressBar2(40)
       print 'c'
       instance_m.call_progressBar2(60)
       print 'd'
       instance_m.call_progressBar2(100)

```