Review Request 127847: Fix invisible window with Qt 5.6
Elvis Angelaccio
elvis.angelaccio at kdemail.net
Thu May 5 15:26:44 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127847/
-----------------------------------------------------------
Review request for KDE Utils.
Bugs: 360105
http://bugs.kde.org/show_bug.cgi?id=360105
Repository: kcalc
Description
-------
Since Qt 5.6, `minimumSize()` returns an empty size (`QSize(0, 0)`).
This cause an invisible main window in KCalc, due to a `setFixedSize(minimumSize())` call.
This (new?) behavior is documented in the [QWidget api](http://doc.qt.io/qt-5/qwidget.html#minimumSize-prop), so it doesn't look like a bug in Qt.
The proper way to set a fixed size (based on the actual content) is to use `QLayout::setSizeConstraint()`, as suggested by the documentation of `setFixedSize()` itself.
Diffs
-----
kcalc.cpp 13b7bd3
Diff: https://git.reviewboard.kde.org/r/127847/diff/
Testing
-------
KCalc is now visible again with Qt 5.6. The main window size is fixed as before.
Thanks,
Elvis Angelaccio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20160505/bd279f74/attachment.html>
More information about the Kde-utils-devel
mailing list