I’m still having some issues with dynamically updating my UI (widgets) when updating my database (MySQL). I thought I had this solved by using show, update and events on various widgets at different points in my code but then I stumbled across app.processEvents().
This function appeared to solve all my previous problems and allowed me update widgets from anywhere in my code. Then I read that using this is a bad practice due to possible unplanned events firing when I don’t need them to and also using it slows down the code…
OK … so I did some additional digging and came across Martin’s short Threading Walk Through showing a better way of handling data updates in a different thread. I’ve modified my code utilize this and have run into a new set of problems.
The bottom portion of my screen layouts I have a section reserved for buttons, prompts and messages as my application runs. This area continually updates via a messagebox() (my code). I need the thread to use this function when it completes.
What’s happening currently is the thread does complete as expected but the call to messagebox() is outputting to it’s own thread. I need it output to the main thread.
Any ideas ? I can show the worker definition and messagebox() but my app currently is huge.
thanks in advance,