Dialog or Widgets redraw in a loop



  • I want show a small dialog during a longer calculation.

    ShowDialog
    Calculations .................
    CloseDialog

    The 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.


  • Lifetime Qt Champion

    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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.