View Single Post
Old 06-10-2025, 09:37 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,381
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'm surprised this ever worked. In Qt the "correct" way to update the UI while also busy looping in the GUI thread is to periodically call QApplication.processEvents(ExcludeUserInputEvents)

You can do that after every call to update the status bar. Repainting it directly should also work provided you are careful to ensure no recursion occurs. I wont accept a PR to have show_message() repaint directly because this is dangeroud, if a user of show_message() happens to call it froma paintEvent, it can lead to infinite recursion and a crash.

Last edited by kovidgoyal; 06-10-2025 at 09:43 PM.
kovidgoyal is online now   Reply With Quote