I'm using saveGeometry/saveState and restorGeometry/restoreState as documented here:

http://doc.qt.io/qt-4.8/restoring-geometry.html

When I start the application, the QMainWindow has the same width as when it was closed, but its height grows so that the bottom part of the widget is not visible. I resize the window and exit, but the new height is not restored on the next application start-up.

If I set a maximum size on the QMainWindow, this can be avoided. But, I don't want to do that since at a different screen resolution, a bigger QMainWindow height wouldn't be an issue.

Can a layout or widgets inside a QMainWindow cause it to grow in size after its geometry is restored?

If not, what else might be causing this?