Review Request 127847: Fix invisible window with Qt 5.6

Elvis Angelaccio elvis.angelaccio at kdemail.net
Thu May 5 21:57:05 UTC 2016


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

(Updated May 5, 2016, 9:57 p.m.)


Status
------

This change has been marked as submitted.


Review request for KDE Utils.


Changes
-------

Submitted with commit 2678cb9c7a07381e3ffb8a2107946cec53bf5909 by Elvis Angelaccio to branch Applications/16.04.


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
-----

  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/587f0bf6/attachment-0001.html>


More information about the Kde-utils-devel mailing list