QMainWindow::resizeEvent() is called multiple times

  • I have found similar discussion here:
    but is ended up with nothing.

    I subclassed QMainWindow to catch resizeEvent() because I need to know actual window size after calling showMaximized().

    To my surprise resizeEvent() was fired 4 times during my application startup:
    2 times inside showMaximized(), providing size of 100x200 (?????) and 640x480
    and 2 times form the main event loop, providing 100x200 and then 1280x971 (actual size).

    So my question is: what was this and how to distinguish "right" event from the "wrong" one?

    My windows does nor have any child widgets. When I resize the window myself, everything is OK - only 1 event is fired.

Log in to reply

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