[Development] Proposal to deprecate the amazing QApplication::globalStrut

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Thu Dec 5 19:41:24 CET 2019


Il 05/12/19 19:10, Uwe Rathmann ha scritto:
> You could argue that a good style API allows to increase all sizes by
> overloading the virtual methods, but this is very tedious and I doubt,
> that you can do everything this way.

Not necessarily; a style could have on itself the "equivalent" of 
globalStrut. However QStyle doesn't seem to have the equivalent of 
sizeHint / minimumSizeHint, so widgets cannot delegate that calculation 
to the style (which may take into account its own globalStrut), and 
instead widgets have use globalStrut themselves...


> And of course you won't be able to handle 3rd party widgets that QStyle
> does not know of. F.e for Qwt widgets only globalStrut is effective.

So, what you're implying is: lacking a better QStyle replacement, and I 
strongly doubt we'll get one in Qt 6,
1) we need globalStrut,
2) we should fix all Qt's own widgets to honour it?

My 2 c,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20191205/63a8c212/attachment.bin>


More information about the Development mailing list