Results 1 to 4 of 4

Thread: Does it use native widgets or imitates?

  1. #1
    Join Date
    Jul 2008
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Does it use native widgets or imitates?

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Does it use native widgets or imitates?

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jul 2008
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Does it use native widgets or imitates?

    Quote Originally Posted by wysota View Post
    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?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Does it use native widgets or imitates?

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. The following user says thank you to wysota for this useful post:

    ZuLuuuuuu (13th May 2009)

Similar Threads

  1. Qt3 - Multiple transparent widgets
    By bythesea in forum Qt Programming
    Replies: 4
    Last Post: 11th September 2009, 11:24
  2. Mac OS X Top-Level Transparent Widgets
    By tinsuke in forum Qt Programming
    Replies: 0
    Last Post: 17th October 2008, 16:01
  3. Upper limit on number of widgets?
    By jdiewald in forum Qt Programming
    Replies: 1
    Last Post: 29th September 2008, 23:00
  4. Replies: 2
    Last Post: 16th May 2008, 14:39
  5. widgets behind hidden widgets not working
    By bpetty in forum Newbie
    Replies: 13
    Last Post: 7th September 2007, 20:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.