How to force update

  • I have a number of widgets, in most cases everything updates and works, but in one particular case a button doesn't update, yet if I stop in the debugger then single step the update occurs....I'm manually calling the 'update' method associated with the widget but this doesn't cause and instant update. I've tried using QCoreApplication::processEvents(), but this causes a crash.

    How can I ensure a widget is redrawn when I want it to be?

  • Qt Champions 2017

    its sounds a bit odd.
    What do u mean by update ?
    You change the text on button ?
    Normally it will redraw them self when needed for Qts classes.

    So i think we need a bit more context and code to give any suggestions.

    Only thing i know to prevent updates is using long lasting loops or any construct that strangulates the
    event queue.

Log in to reply

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