Commit Graph

2 Commits

Author SHA1 Message Date
Alessandro Portale
25323be13d Utils: Fix setting of minimal height of InfoLabels in QFormLayout
Calling setMinimumHeight is not compatible with QFormLayout if the label
has multiple lines. Overriding minimumSizeHint on the other hand is.

Change-Id: Id2167b295620322cec75035d7cc7125cc3221c4d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-09 12:26:57 +00:00
Alessandro Portale
cd86aa05d6 Utils: Introduce InfoLabel
Utils::InfoLabel is meant to replace around 30 custom implementations of
a QHBoxLayout with an pixmap QLabel and a text QLabel.

Instead of fiddling with pixmaps, the user of InfoLabel can set an enum
for info/warning/etc... type. Internally, a globally shared QIcon is
used. The usage of QIcon ensures that @1x, @2x and hybrid cases are
handled.

Task-number: QTCREATORBUG-23346
Change-Id: I0f91a21e64f095db14837512263c4becbb2c13d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-12-19 14:02:10 +00:00