I want to setup a progressBar until end of the execution of a particular method.
class MainWindow(QMainWindow, TeamInsight.Ui_MainWindow):
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent)
self.setupUi(self)
def on_click_uploadAndTest(self):
self.progressBar.setHidden(False)
self.progressBar.setEnabled(True)
self.statusbar.showMessage("Testing in progress...")
result = predictwithUI.predict(self.image_path)
# Display the output code is here
method on_click_uploadAndTest
takes considerable time to execute. Meanwhile progressBar
should visualize the execution progress.
UPDATE:
result is a String array. predict()
method in 'predictwithUI.py' gives output of string array (result). 'predictwithUI.py' predicts characters in a given image using a trained neural network model.
If number of characters in a given image is large then it takes considerable time to give the output.
So I want to setup progressBar until predict()
gives output.