Review Request 127847: Fix invisible window with Qt 5.6

Elvis Angelaccio elvis.angelaccio at kdemail.net
Thu May 5 16:08:07 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127847/
-----------------------------------------------------------

(Updated May 5, 2016, 4:08 p.m.)


Review request for KDE Utils.


Changes
-------

Drop unnecessary changes to kcalc.ui. Only remove the spacer.


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](http://doc.qt.io/qt-5/qwidget.html#setFixedSize) of `setFixedSize()` itself.


Diffs (updated)
-----

  kcalc.cpp 13b7bd3 
  kcalc.ui 7511ffe 

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/622b922a/attachment-0001.html>


More information about the Kde-utils-devel mailing list