Hot to get the size of a QMainWindow before it was maximized
-
Hi all!
How can I get size of a
QMainWindowbefore it was maximized?I tried to reimplement the
changeEventand look forWindowStateChangeevents, but if I catch one, thesize()is already the maximized one.I tried to do a
showNormal(), then read the size, but still, the size is the maximized one.setWindowFlags()is only passed to the d pointer'ssetWindowFlags(), so I think I have no chance to access the probably cached size that is restored if a Window is shown normal after having been maximized.I'm out of ideas … thanks for all help :-)
-
Hi
what about
https://doc.qt.io/qt-5/qwidget.html#resizeEvent
and the QResizeEvent::oldSize() ?