PDA

View Full Version : Does it use native widgets or imitates?



ZuLuuuuuu
12th May 2009, 21:28
Hello,

I heard that Qt software uses native widgets on Windows or MacOS so that it looks just like other software which uses win32 api. But this page:

http://doc.trolltech.com/4.2/qwindowsstyle.html#details

says "The QWindowsStyle class provides a Microsoft Windows-like look and feel. This style is Qt's default GUI style on Windows." and gives a screenshot of a Linux application which has Windows alike look. So this means Qt imitates the native look on Windows just like GTK+ imitates the native look on Windows? If yes than what is the difference between the rendering systems of GTK+ and Qt on Windows?

I'm a newbie started to learn Qt, so expect more questions like these soon :)

wysota
12th May 2009, 22:24
The so called "Windows" style is an imitation of "old" WinAPI GUI but there are newer styles - WindowsXP and WindowsVista that use native rendering so that the applications follow the style of the system (including different themes you can use on the mentioned system). Of course the mentinoed styles are only available on appropriate systems (the first on XP and Vista, the latter on Vista only). On older installations the Windows style will be used.

ZuLuuuuuu
13th May 2009, 07:01
WindowsXP and WindowsVista that use native rendering so that the applications follow the style of the system (including different themes you can use on the mentioned system). Of course the mentinoed styles are only available on appropriate systems (the first on XP and Vista, the latter on Vista only). On older installations the Windows style will be used.

Thanks, does that mean that if I compile my program with Windows XP style then it will look like Windows XP application even if it is executed on Windows Vista?

wysota
13th May 2009, 07:50
You don't compile your application with a specific style. All the styles are available on all Qt installations that support them. So if you build the application with Windows XP but deploy it on a system with Vista and Qt was built with support for Vista style, your application will use Vista style by default.