I have a GUI class created by Qt designer in which i have a progress bar, and another class in which all the number crunching is done during which i want my progress bar to update regularly. The way i thought i would do this it to do something like this in the other class:
gui.progressbar.setValue(some%)
but i cant seem to make that work. the code for the gui class is something like:
from PyQt4 import QtCore, QtGui
from Run import RunProgram
class Ui_mainLayout(QtGui.QWidget):
def setupUi(self, mainLayout):
mainLayout.setObjectName(_fromUtf8("mainLayout"))
def setLayout():
self.basic_tab = QtGui.QWidget()
self.progressBar = QtGui.QProgressBar(self.basic_tab)
setLayout()
RunProgram()
i was then hoping to be able to do something like:
import gui
class RunProgram:
def __init__(self):
something = someMaths
gui.Ui_mainLayout.progressBar.setValue(something)
but obviously as i am useless this doesnt work, could someone point me in the right direction? please and thank you