Damien Gerard ha scritto:
On Jan 21, 2008, at 10:03 PM, Graeme Geldenhuys wrote:
On 21/01/2008, Den Jean <[EMAIL PROTECTED]> wrote:
On Monday 21 January 2008 01:18:56 pm Giuliano Colla wrote:
Either one takes the Qt way, i.e. using style to *mimic* the native
*look*, without actually using it, and provides a consistent behavior,
this does not honour the huge Qt effort. Qt DOES use
the native widget when necessary do have native look for XP, Vista
and Mac OS
X style. This is why these styles are not available on the other
platforms
because the lack of the native widget set library.
Nope, it's like I explained before. Qt does all custom painting, it
does not required the underlying 'native' widgets. They used to copy
the look of OS's by manually drawing all controls. Since late 3.x or
starting with 4.x (not sure which version) Qt under XP, Vista, MacOS X
and GTK asks the corresponding component (via native API) to draw
itself on a memory bitmap. Qt then paints that bitmap to the correct
location on the form. This overcomes the issue when user install there
own custom themes. Qt does not create a instance of the native widget.
For others I don't know but for Carbon I have a big doubt.
It's virtually impossible to support styles (which can be changed at
run-time, don't forget) and actually use native widgetsets.
This would mean dynamically readjust all dependencies, taking into
account the different implementation whims. They would be fools, and
they aren't.
From Qt4 sources (Qtstyle.cpp):
</quote>
Qt contains a set of QStyle subclasses that emulate the styles of
the different platforms supported by Qt (QWindowsStyle,
QMacStyle, QMotifStyle, etc.). By default, these styles are built
into the QtGui library. Styles can also be made available as
plugins.
Qt's built-in widgets use QStyle to perform nearly all of their
drawing, ensuring that they look exactly like the equivalent
native widgets. The diagram below shows a QComboBox in eight
different styles.
<quote/>
Giuliano
--
Giuliano Colla
Whenever people agree with me, I always feel I must be wrong (O. Wilde)
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives