Trigering a repaint event

  • Hi all,I am trying to get a window to be repainted after some set up and I find it weird that it is not being repainted after calling update() .I have even called repaint() on the window and nothing happened.Has anybody run into such a problem before ?If yes I would really appreciate it if you shared.


  • Moderators

    Are updates enabled (QWidget::setUpdatesEnabled)? Or are we talking about QtQuick? Then you need to set the item dirty (QQuickItem::ItemHasContents) before it will update. See "the doc":

  • I checked that the updates are enabled and they are.I have tried every idea I could come up with and no luck so far.Here is what I want to achieve.I have a bunch of control buttons on my main window and I want to use them to control the position of the palettes(LEFT/RIGHT).

    Here is my slot that responds to a button push:
    @void UBBoardPaletteManager::leftRightButtonClicked()


    and in the constructor of the palette I made sure that updates are enabled by the following code:

    @UBLeftPalette::UBLeftPalette(QWidget *parent, const char *name):
    UBDockPalette(eUBDockPaletteType_LEFT, parent)



    With this setup it is my belief that after the button is pushed ,the palette(widget) should automatically be redrawn and positioned where i want it to be.

    Is something wrong with my idea flow?Thanks for your time.

Log in to reply

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