There is a button in my pyqt gui that when clicked runs a function that does some lengthy math calculations. Inside this function there were a lot of print statements like:
Just make a call to QCoreApplication.processEvents after each append
You can get your instance of QCoreApplication
with the static method QCoreApplication.instance
This will ask Qt to "refresh" your gui before finishing the tasks that are being executed, as the command processes all pending events.