Results 1 to 2 of 2

Thread: Linking error while setting up application'style to QwindowsXP Style.

  1. #1
    Join Date
    Jan 2007
    Posts
    92
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default Linking error while setting up application'style to QwindowsXP Style.

    Linking error while setting up application'style to QwindowsXP Style.

    I am receving a linking error when trying to set application to QWIndowsXPStyle. I have attached header file also.


    (QApplication::setStyle(new QWindowsXPStyle));



    code snippet from CustomStyle.cpp file :


    class CustomStylePrivate : public QWindowsStylePrivate
    {
    Q_DECLARE_PUBLIC(CustomStyle)
    public:
    CustomStylePrivate()
    : QWindowsStylePrivate(), hasInitColors(false), bufferDC(0), bufferBitmap(0), nullBitmap(0),
    bufferPixels(0), bufferW(0), bufferH(0)
    { init(); }

    ~CustomStylePrivate()
    { cleanup(); }



    error LNK2019: unresolved external symbol "public: __thiscall QWindowsStylePrivate::QWindowsStylePrivate(void)" (??0QWindowsStylePrivate@@QAE@XZ) referenced in function "public: __thiscall CustomStylePrivate::CustomStylePrivate(void)" (??0CustomStylePrivate@@QAE@XZ)
    Attached Files Attached Files
    Last edited by user_mail07; 6th February 2007 at 23:49.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Linking error while setting up application'style to QwindowsXP Style.

    Quote Originally Posted by user_mail07 View Post
    error LNK2019: unresolved external symbol "public: __thiscall QWindowsStylePrivate::QWindowsStylePrivate(void)" (??0QWindowsStylePrivate@@QAE@XZ) referenced in function "public: __thiscall CustomStylePrivate::CustomStylePrivate(void)" (??0CustomStylePrivate@@QAE@XZ)
    QWindowsStylePrivate is not a part of public API and it isn't exported, so you can't use it in your program. Subclass QWindowsStyle instead.

  3. The following user says thank you to jacek for this useful post:

    user_mail07 (7th February 2007)

Similar Threads

  1. Setting style in QApplication
    By Doug Broadwell in forum Newbie
    Replies: 2
    Last Post: 28th October 2006, 21:56

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.