MainWindow won't resize, why does this work?
I have a reimplementation of QMainWindow, whose contents change size dynamically. When they shrink, I can't get MainWindow to shrink along with them. When I manually adjust the size of the window, it automatically snaps to the right size, but no combination of setGeometry(), resize(), adjustSize() or fiddling with size policies and size hints has worked. I fumbled across a solution by calling:
Code:
hide();
showMinimized();
show();
showNormal();
which works.. but obviously isn't ideal. And I'm not quite sure why it works. Anyone have any thoughts?
Re: MainWindow won't resize, why does this work?
Most likely you have overridden something in your main window.
Post the complete code of the main window