hello,
I am pretty new to Qt and I started of with Qt4.3 a while back and recently had to change to Qt5.1 (due to switching to from VS2008 to VS2012).
I used to be able to compile the qtpropertybrowser from the qt-solutions repository into my project.
I downloaded the latest version of it and looked at the examples. I included all the sources in my VS2012 project and hit compile but I got tons of errors (350+).
then I tried to just get it to compile in a much simpler test project.
So I created a Qt Application via the VS "create new Qt project" , I then added all the qtpropertbrowser headers and cpp files to the project. and hit compile
I am getting various other errors with that (althought they seem to be slightly different.
it wont allow me to post all the errors here due to character limit but it seems to fail in stuff like this :
error C2065: 'qVariantValue' : undeclared identifier
error C2275: 'QString' : illegal use of this type as an expression
error C2275: 'QKeySequence' : illegal use of this type as an expression
error C2065: 'qFindChildren' : undeclared identifier
(and a lot more)
I remember this used to work out of the box but it doesn't seem to work anymore.
anyone knows what I might be doing wrong ? If I run the samples via the Qt Creator they all work fine.
here a link to my test project on my google drive : https://docs.google.com/file/d/0B3IV...it?usp=sharing
Added after 16 minutes:
If I build the QtPropertyBrowser as a library and include it in my test project I get these errors :
1>------ Rebuild All started: Project: TestQtPropertyBrowser, Configuration: Debug x64 ------
1> Moc'ing testqtpropertybrowser.h...
1> Uic'ing testqtpropertybrowser.ui...
1> Moc'ing qtvariantproperty.h...
1> Moc'ing qttreepropertybrowser.h...
1> Moc'ing qtpropertymanager.h...
1> Moc'ing qtpropertybrowserutils_p.h...
1> Moc'ing qtpropertybrowser.h...
1> Moc'ing qtgroupboxpropertybrowser.h...
1> Moc'ing qteditorfactory.h...
1> Moc'ing qtbuttonpropertybrowser.h...
1> Rcc'ing testqtpropertybrowser.qrc...
1>RCC : warning : No resources in 'C:\Users\Chrys\Documents\Visual Studio 2012\Projects\TestQtPropertyBrowser\testqtproperty browser.qrc'.
1>
1> moc_qtpropertybrowserutils_p.cpp
1> moc_testqtpropertybrowser.cpp
1> main.cpp
1> testqtpropertybrowser.cpp
1> Generating Code...
1> qrc_testqtpropertybrowser.cpp
1>moc_qtpropertybrowserutils_p.obj : error LNK2019: unresolved external symbol "public: void __cdecl QtKeySequenceEdit::setKeySequence(class QKeySequence const &)" (?setKeySequence@QtKeySequenceEdit@@QEAAXAEBVQKeyS equence@@@Z) referenced in function "private: static void __cdecl QtKeySequenceEdit::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall@QtKeySequenceEdit@@CAXPEAVQOb ject@@W4Call@QMetaObject@@HPEAPEAX@Z)
1>moc_qtpropertybrowserutils_p.obj : error LNK2019: unresolved external symbol "private: void __cdecl QtKeySequenceEdit::slotClearShortcut(void)" (?slotClearShortcut@QtKeySequenceEdit@@AEAAXXZ) referenced in function "private: static void __cdecl QtKeySequenceEdit::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall@QtKeySequenceEdit@@CAXPEAVQOb ject@@W4Call@QMetaObject@@HPEAPEAX@Z)
1>C:\Users\Chrys\Documents\Visual Studio 2012\Projects\TestQtPropertyBrowser\x64\Debug\\Tes tQtPropertyBrowser.exe : fatal error LNK1120: 2 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
EDIT: using the library actually works, I had left the headers in the solution, removing them fixed the problem. Still when I try to include the headers and sources in my project , the build errors remain.
Bookmarks