PDA

View Full Version : Linking error while setting up application'style to QwindowsXP Style.



user_mail07
6th February 2007, 23:45
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)

jacek
7th February 2007, 00:12
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.