Skip to content Skip to sidebar Skip to footer

Pyqt: 'dynamically' Append To Qtextedit From Function

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: print

Solution 1:

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.

Post a Comment for "Pyqt: 'dynamically' Append To Qtextedit From Function"