![]() Is there really no solution for forcing a widget update from a other thread? You can only request a widget to be repainted from another thread, when the event that's posted gets processed the widget itself will be updated. You can prepare in a worker thread whatever is that needs to be done in the GUI and schedule the painting at the appropriate times (by signal-slots), the painting itself, however, will (and should) be happening in the main thread. Taking the time consuming code in a other thread works for pure code but usually I make here other GUI stuff too. Must write everywhere QCoreApplication::processEvents() ? This processes the events, nothing more, I'd suggest redesigning your code so you don't need to call that function at all (for example running your thread with an event loop and a timer, not subclassing QThread). ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |