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

Matthew Woehlke mwoehlke.floss at gmail.com
Thu Nov 24 17:48:48 CET 2016


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



More information about the Development mailing list