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.
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.
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.
According to a comment here from @hardikajmani: