Hi,
I've noticed a change in the way, sizes are set up in the construction process. With 4.7.0 I am able to get the final size of the app in MainWindow's constructor, with 5.2.1 this seems to have changed somehow.
I've created a minimal, compileable example that demonstrates the difference by qDebug()ing the size information at various steps while constructing the QMainWindow. (--> see Attachments, there's also a screenshot of the different outputs): outputs in winmerge.jpg
Please note that both source codes are identical apart from the "<QtWidgets/"-stuff in the #include-Sections.
Both systems are set up in a Win7-environment, the 5.2.1 is running on a VM though. For now, I've tested this for Windows/MinGW.
- Is this a bug or a "feature"? Shall I file a former, if it is one?
- Is there a sensible workaround to obtain the final size already in the MainWindow constructor?
It's actually workaroundable by calling all the initialisation stuff from the nth resizeEvent (for me: n=3) instead of from the constructor, but that seems to be a bit hacky for me.
I am aware of this thread - so the conclusion is that the code shouldn't have worked in the first place, but just did?
I am actually quite curious about what kind of underlying architecture change caused this behavioural difference..
Sebastian
Bookmarks