Thanks for sharing this very informative tutorial.
I was wondering, what do you do when the GUI updating part is what makes the GUI freeze. For example if you add a time.sleep(0.8) in recurring_timer() then the GUI becomes unresponsive for 0.8 second. Which means you cannot click on the Danger button for that period of time for example (and you might think that you clicked the button but the click was never registered)
I am experiencing this issue right now as I am trying to make a live stock market GUI with 100s of prices updating live. In my case the main thread cannot cope with displaying all the prices (even throttled to only once a second) and still allow the user to type GUI inputs (like in a QLineEdit for example, or clicking some buttons).
I have tried to run parallel threads to update the GUI but as many have pointed out on the internet this triggers random inexplicable crashes.
Any suggestions will be most welcome.