Dialog or Widgets redraw in a loop
-
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.