That would work (run custom code in separate thread in background) but I'd like to avoid that. This is how it worked before and I'd like to run it in main thread to avoid any deadlock/synchronisation dangerous.
What I tried is to run processEvents() loop (with some sleep) in another thread to re-paint the dialog. It runs correctly but without any visible result.
Bookmarks