[Development] Basing Qt Creator Coding Style on C++ Core Guidelines?

Marco Bubke Marco.Bubke at qt.io
Thu Nov 24 17:48:11 CET 2016


So you are writing a style for the QPaintEngine. What if you have a OpenGL back end or some other back ends where your descriptions does not fit that well any more? I have seen much more complicated things written in an abstract way, so it should be possible. And I haven't said that you should use CSS. Some custom  DSL would quite handy. Actually I don't care about that fancy styles, they looks too baroque to me but I want something like Flatpak so I don't have work with outdated packages! But that are my priorities. [?]

________________________________
From: Matthew Woehlke <mwoehlke.floss at gmail.com>
Sent: Thursday, November 24, 2016 5:36:04 PM
To: development at qt-project.org
Cc: Marco Bubke
Subject: Re: Basing Qt Creator Coding Style on C++ Core Guidelines?

On 2016-11-22 06:25, Marco Bubke wrote:
> On November 22, 2016 08:17:57 Thiago Macieira wrote:
>> Theming and styling is a complex operation. It's not just "propagating
>> values". Reading config files will at best get you the right font, correct icon
>> set, and somewhat correct colours. But gradients, shapes, complex dialogs will
>> not work.
>
> I don't see the problem to describe it in text, like CSS is doing.

Clearly you have never actually written a QStyle. Something like Oxygen
involves *multiple* gradients just for the window background. Don't
forget inline SVG's for elements like the tree expanders and the 'icons'
on scroll bar buttons, combo boxes, spin boxes... and that's not even
the *hard* stuff.

Try specifying a tab bar in CSS. You have text margins, margins between
the tabs, possible complex shapes of the tabs themselves (all of which
need complicated gradients for shading)... The current version of the
Oxygen style (well, the KDE4 version anyway) represents *years* of work,
and even then I would not say it is perfect.

Take a look at
http://pcdesktops.emuunlim.com/pictures/skins/wb/macosx-aqua-bjb.gif and
explain to me how to replicate that in CSS. Start with the scroll bar
handle. *Then* I will believe you when you say there is no problem
describing widget style in CSS.

That said, there *is* a textual language that can be used to adequately
describe a style. That language is commonly known as "C++".

--
Matthew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20161124/909acff3/attachment.html>


More information about the Development mailing list