linking error while implementing QMotifStyle
Hi,
I posted a question before.
http://www.qtcentre.org/forum/f-qt-d...html#post72928
Since it is really hard to change the button shape, so i would like to try a different style to see how the buttons look like.
But after i changed QWindowsStyle to QMotifStyle, i got lots of linking errors. I posted a few errors
cim error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QMotifStyle::QMotifStyle(bool)" (__imp_??0QMotifStyle@@QAE@_N@Z)
cim error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QMotifStyle::QMotifStyle(bool)" (__imp_??0QMotifStyle@@QAE@_N@Z)
cim error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QMotifStyle::~QMotifStyle(void)" (__imp_??1QMotifStyle@@UAE@XZ)
cim error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall QMotifStyle::qt_emit(int,struct QUObject *)" (__imp_?qt_emit@QMotifStyle@@UAE_NHPAUQUObject@@@Z )
cim error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall QMotifStyle::qt_invoke(int,struct QUObject *)" (__imp_?qt_invoke@QMotifStyle@@UAE_NHPAUQUObject@@ @Z)
.Could anyone please tell me what to do to fix these errors.
Thanks.
Re: linking error while implementing QMotifStyle
Where did you change QWindowsStyle to QMotifStyle?
Re: linking error while implementing QMotifStyle
Quote:
Originally Posted by
wysota
Where did you change QWindowsStyle to QMotifStyle?
I changed all the appearances of QWindowsStyle to QMotifStyle in the file myStyle.cpp which was attached in my previous post. Here is the link
http://www.qtcentre.org/forum/f-qt-d...html#post72928
Re: linking error while implementing QMotifStyle
Re: linking error while implementing QMotifStyle
Quote:
Originally Posted by
jpn
Hi,
Thank you for the reply. i put this line qDebug() << QStyleFactory::keys(); in my code, it gives error C2660: 'qDebug' : function does not take 0 arguments.
After i changed the code to qDebug(0) << QStyleFactory::keys(); , it gives another error
error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'void' (or there is no acceptable conversion).
could you please tell me how to fix the errors?
Re: linking error while implementing QMotifStyle
Try including the header:
Re: linking error while implementing QMotifStyle
Quote:
Originally Posted by
jpn
Try including the header:
Hi,
I am using qt3.3.5, is QtDebug available in this version?
Do you what other styles available in this version?
Thanks
Re: linking error while implementing QMotifStyle
Quote:
Originally Posted by
lzha022
I am using qt3.3.5, is QtDebug available in this version?
Sorry, I missed that.
Quote:
Do you what other styles available in this version?
That's what I'm trying to get outputted. :)
Anyway, QStyleFactory::keys() exists in Qt 3 too, just print each key by hand. It will print all available styles. Perhaps you don't have such style compiled in your library...
Re: linking error while implementing QMotifStyle
Hi ,
Here is the output i get. So this means i do have Motif style. I just want to try a different style other than windows to see how it looks like. What other style do you recommend?
MotifPlus
Platinum
Motif
SGI
CDE
Windows
Thanks
Re: linking error while implementing QMotifStyle
To see how the application looks like with another style, you don't have to recompile your code. Simply execute your application with a "-style motif" switch.
Re: linking error while implementing QMotifStyle
Quote:
Originally Posted by
wysota
To see how the application looks like with another style, you don't have to recompile your code. Simply execute your application with a "-style motif" switch.
Could you please tell me how to swith that? -Sorry i am not very familiar with QT, and i am using QT with .NET
Will it switch motif on even if i have applied myStyle which implemented from WindowsStyle?
Re: linking error while implementing QMotifStyle
It has nothing to do with Qt or .NET or whatever else framework you might be using :) I meant you have to run your application with a "-style motif" parameter passed from within a shortcut or the command line.
Re: linking error while implementing QMotifStyle
Quote:
Originally Posted by
wysota
It has nothing to do with Qt or .NET or whatever else framework you might be using :) I meant you have to run your application with a "-style motif" parameter passed from within a shortcut or the command line.
But how should i pass the parameter '-style motif'?
I can run my application by typing "myApp.exe", but when i typed "myApp.exe - style motif", nothing happened, the applicatin did not start.
Re: linking error while implementing QMotifStyle
myApp.exe -style motif
If the application doesn't start, you need to find out why - the problem is within the application itself (it might rely on some files which it can't find, etc.).
Re: linking error while implementing QMotifStyle
Quote:
Originally Posted by
wysota
myApp.exe -style motif
If the application doesn't start, you need to find out why - the problem is within the application itself (it might rely on some files which it can't find, etc.).
The application starts if i type myApp.exe, but when i type myApp.exe -style motif, it does not.
Re: linking error while implementing QMotifStyle
Without knowing the code, it is hard to help you. You can try debugging and see if and why the application crashes.
Re: linking error while implementing QMotifStyle
Quote:
Originally Posted by
wysota
Without knowing the code, it is hard to help you. You can try debugging and see if and why the application crashes.
Thanks.
back to the original question, do you know how to fix those linking errors?
Re: linking error while implementing QMotifStyle
Not without seeing any code and project file.