Sizes in construction - different behaviour Qt5 to Qt4 (example attached)

11 views
Skip to first unread message

Sebastian Diel

unread,
Apr 22, 2014, 6:03:21 PM4/22/14
to andro...@googlegroups.com
Hi,

I've noticed a change in the way, sizes are set up in the construction
process, with 4.7.0 I was 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
problem by qDebug()ing the size information at various steps while
constructing the QMainWindow. (--> see Attachments)

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 workaround to obtain the final size already in the
MainWindow constructor?

I really need it there :-/
Right now this keeps my app (behaves well with 4.7.0) from working
properly with 5.x.

Sebastian

--
http://www.classintouch.de - Tablet-Software für Lehrer

outputs in winmerge.png
sizeProb-sources.zip

Sebastian Diel

unread,
Apr 24, 2014, 6:42:42 AM4/24/14
to andro...@googlegroups.com
Hi again,
sorry - I wrote this post to the wrong mailing list/forum, as this is
not an android-related thing.
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'll post it in an appropriate forum.
Sebastian

Sebastian
Reply all
Reply to author
Forward
0 new messages