Hello,
I’m using QStateMachine with several sets of subclassed QState’s.
In one of these, I’m overriding onExit() to make some work when exiting the state. This work is long (about 2 secs) and I would like to update the GUI in order to tell the user that some work is on going. A QStackedLayout is used: one of the layer is shown and the text of a QLabel (inside the QWidget/layer of the stacked layout) is then set at the beginning of onExit(), before the hard work.
Unfortunately, the GUI is updated later by when onExit() is over and after I guess some Qt internal loop/statemachine work.
I tried to force to update() the widget or processEvents() (QApplication), but was unsuccessful.
Do you have any hint about updating the GUI in onExit()?
Thanks
↧