[Development] Proposal to deprecate the amazing QApplication::globalStrut
Volker Hilsheimer
volker.hilsheimer at qt.io
Wed Dec 4 16:07:40 CET 2019
> On 4 Dec 2019, at 13:15, Christoph Feck <cfeck at kde.org> wrote:
>
> On 12/04/19 12:56, Volker Hilsheimer wrote:
>> Hi,
>>
>> QApplication::globalStrut is a property that has outlived its purpose.
>>
>> IIRC, then I added that in the early Qt 2 days, anticipating that with Qt/Embedded we might see our widgets landing on touch screens “any moment now”. The idea was to have a global setting that ensured that widgets and other interactables (such as menu items, list items, checkbox markers etc) are at least x,y pixels large.
>>
>> Well, the world has moved on, and the value has never been consistely used in styles or widgets anyway.
>
> I am not in the position to object code changes, but the Skulpture widget style fully respects the globalStrut for all widgets since many years.
>
> https://kdepepo.wordpress.com/2009/03/12/global-strut-feature/
Hi Christoph,
That’s cool! Sadly, many of our widgets (for instance, none of the item views), and none of our quick controls respect the globalStrut property. So if we want to make this a thing, then it requires a fairly significant effort across our widgets (not to speak of testing the outcome). It will probably still be possible to implement a style that expands all things to a configurable size; you don’t need QApplication::globalStrut for that.
Application UIs are anyway designed for touch if they are for devices; trying to make desktop UI concepts and widget sets work for touch UIs is fortunately a thing of the past. To support people with neeed for visiual or motoric support features, device platforms have accessibility solutions as well.
So, even if it were done more thoroughly, I think a toolkit-specific “strut configuration” is no longer a sensible approach.
Cheers,
Volker
More information about the Development
mailing list