Print status message before exiting a QWidget
Upon exiting a widget which is in a new window, I would like to print a
status message in its QTextBrowser. This is because when I exit the
window, it calls a function in the main window which takes some time to
complete, and the window containing this QTextBrowser remains open for a
couple minutes.
I have the following defined inside my QWidget class for the window which
gets closed:
def closeEvent(self,e):
self.browser.append('Please wait while calculations are performed.
This may take up to a few minutes...')
self.main_instance.update_data(self.data)
The update_data() call in my main window gets executed and it takes some
time to complete, but the QTextBrowser in the window which gets closed
does not get updated.
Please let me know if what I'm trying to achieve is possible, or give me
some insight as to why it's not possible.
No comments:
Post a Comment