On 29.01.11 18:50:14, Riccardo Bellini wrote:
> Hmmm, I have tried your solution (also including myfile.moc at the end of
> the .cpp file), but it complains about undefined references to vtable and it
> does not compile...

Ah, sorry, just re-read the qt4_automoc code, it indeed does not support
QObject in .cpp files. Sorry about the confusion. Indeed I now recall
that the Qt4 CMake macro's don't support QObject classes in .cpp in the
same way that qmake does (or kde's automoc). The only way is indeed
calling qt4_wrap_cpp on the .cpp files and then adding the resulting
moc_*.cxx files to the sources and not #include them at all. The only
thing that'll still be a problem is the case of having foo.h and foo.cpp
with QObject classes in both. That cannot be handled at all with the
macros currently.

Andreas

-- 
Don't go surfing in South Dakota for a while.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to