Qt 6.11 is out! See what's new in the release
blog
Dialog or Widgets redraw in a loop
General and Desktop
2
Posts
2
Posters
587
Views
2
Watching
-
I want show a small dialog during a longer calculation.
ShowDialog
Calculations .................
CloseDialogThe dialog appears but shows only a white blank content.
The following code after dialog showing does not help.
// this == a QDialog subclass
this->update();
this->repaint();
QCoreApplication::processEvents();How can I force a redraw of a dialog or single widgets out of the event-loop.
-
Hi,
If your calculation is long enough processEvents won't really help. You have to either break it in smaller parts or move it outside the GUI thread.