Results 1 to 6 of 6

Thread: WindowsXP Style?

  1. #1
    Join Date
    Jun 2007
    Posts
    3
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default WindowsXP Style?

    Hi,

    I am trying to set my application to use the WindowsXP-Style, but it just won´t work. This is, what I tried:

    #include <Qt/QApplication.h>
    #include <QtGui/QWindowsXPStyle.h>
    Qt Code:
    1. int main( int argc, char* argv[])
    2. {
    3. QApplication::setStyle(new QWindowsXPStyle);
    4. QApplication app( argc, argv);
    To copy to clipboard, switch view to plain text mode 

    But when I try to compile this, I only get

    .\main.cpp(7) : error C2061: syntax error : identifier 'QWindowsXPStyle'

    I turned the WindowsXPStyle during compilation of Qt 4.3 with qconfigure -qt-style-windowsxp and it didn´t produce any error.

    Also, I would like to have the Qt Designer display the WindowsXP Style as well, but this doesn´t work either.

    I am running Qt 4.3 OpenSource edition on WindowsXP.

    Does anybody know what is wrong?

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

    Default Re: WindowsXP Style?

    First of all you should use QStyleFactory. And second of all, did you build Qt after reconfiguring it?

  3. #3
    Join Date
    Jun 2007
    Posts
    3
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: WindowsXP Style?

    Mmhh, ok, obviously the windowsxp style is missing since QStyleFactory doesn´t give me that choice. However, I have no clue what went wrong when compiling Qt4.3. I just run qmake with the option -qt-style-windowsxp and nmake. But this doesn´t seem to have produced the correct result Any ideas, how I can fix this?

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

    Default Re: WindowsXP Style?

    Did you compile on WindowsXP? Did you run on WindowsXP? What did configure report when it finished its job (before you ran nmake)? It should report what is going to be compiled.

  5. #5
    Join Date
    Jun 2007
    Posts
    3
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: WindowsXP Style?

    I am running Windows XP Home and did the compile on the same system, configure told me it will compile the windowsxpstyle and even after doing nmake all nothing has changed (except that designer won´t recognize my selfwritten widgets anymore....)

    Any other ideas?

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

    Default Re: WindowsXP Style?

    It probably means you have two installations of Qt running in parallel and interfering each other. I suggest you remove all your Qt installations, download fresh sources and repeat the compilation process on a clean system.

Similar Threads

  1. Qt 4.3 Style sheet, new features
    By Angelo Moriconi in forum Qt Programming
    Replies: 2
    Last Post: 12th June 2007, 15:22
  2. Set appropriate style for the user's platform ?
    By whitefurrows in forum Qt Programming
    Replies: 9
    Last Post: 22nd May 2007, 00:57
  3. Qt style sheets
    By locus in forum Qt Programming
    Replies: 5
    Last Post: 5th April 2007, 17:03
  4. Setting a Style Issue
    By forrestfsu in forum Qt Programming
    Replies: 5
    Last Post: 28th March 2007, 21:32
  5. about scrollbar style
    By qtopiahooo in forum Qt Programming
    Replies: 1
    Last Post: 25th January 2007, 13:34

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
  •  
Qt is a trademark of The Qt Company.