[Qt-interest] KDE/Gnome/Mac platform standards and guidelines

Nikos Chantziaras realnc at arcor.de
Tue Jun 1 05:13:28 CEST 2010


On 06/01/2010 05:35 AM, Berry Octave wrote:
>> On 06/01/2010 01:10 AM, Nikos Chantziaras wrote:
>>  [...]
>> While digging around, I came across this:
>>
>> http://doc.trolltech.com/4.6/qdialogbuttonbox.html#ButtonLayout-enum
>>
>> But it's weird.  This enum defines WinLayout, GnomeLayout, KdeLayout,
>> and MacLayout, but what the heck is it for?  There doesn't seem to be
>> any use of it.  Neither setting it, nor (which is what I would want)
>> query it.
>>  [...]
>
> Looked up into the sources, here is the line that queries a
> QDialogButtonBox::ButtonLayout (file qdialogbuttonbox.cpp @line 332).
>
> layoutPolicy = QDialogButtonBox::ButtonLayout(q->style()-
>> styleHint(QStyle::SH_DialogButtonLayout, 0, q));
>
> So basically, all you need to do is to query the correct styleHint for your
> application current style.

Thanks!



More information about the Qt-interest-old mailing list