I just started with PyQt and it seems pretty cool but tried to use a “progress bar” to track a long i/o process which introduced me to threads. I have things mostly working and understand how a long i/o would mess up the event queue for functions called AFTER the i/o process is called but I have experienced the following:
- FIRST I try & update some GUI widgets
- Immediately AFTERWARDS I call the long i/o function
Somehow step #2 interferes with step #1! It’s like a time machine!
I’m guessing that the call to step #1 just places GUI commands in a queue which immediately gets interfered with by step #2? So… I guess all I’m asking for is a way to “flush the queue” or somehow force step #1 to complete before step #2? I tried calling various “update” & “repaint” functions but that doesn’t seem to help.
I can (of course) deal with this via threads but it seems a bit inelegant…