AudreyBeard / compressure

4 stars 1 forks source link

Run compressure subprocesses as QThreads to avoid freezing UI #49

Open AudreyBeard opened 10 months ago

AudreyBeard commented 10 months ago

According to a comment here from @hardikajmani:

We cannot provide in-sync (live) progress as the slicing process freezes the UI. That is, the user cannot see it progressing. We need to run the slicing operation under QThread to avoid UI freezing.

AudreyBeard commented 10 months ago

I don't have any knowledge about QThread or progress bars in PyQt6 so I can't comment on this path forward at this time. I'm hoping @hardikajmani can link to documentation or something here.

hardikajmani commented 10 months ago

Here is a good blog that explains the above. Blog

A common use for threads in a GUI application is to offload long-running tasks to worker threads so that the GUI remains responsive to the user’s interactions. In PyQt, you use QThread to create and manage worker threads.