However, if you need to perform longer-running tasks, for example opening/writing a large file, downloading some data, or rendering some complex image, there are going to be problems. If what you're doing is simple, and returns control to the GUI loop quickly, this freeze will be imperceptible to the user.
In practise this means that any time your PySide6 application spends doing something in your code, window communication and GUI interaction are frozen. The thread which runs this event loop - commonly referred to as the GUI thread - also handles all window communication with the host operating system.īy default, any execution triggered by the event loop will also run synchronously within this thread.
exec_() on your QApplication object and runs within the same thread as your Python code.