You're welcome!
Please see http://doc.trolltech.com/4.4/moc.html
Writing Make Rules for Invoking moc
....
For Q_OBJECT class declarations in implementation (.cpp) files, we suggest a makefile rule like this:
foo.o: foo.moc
foo.moc: foo.cpp
moc $(DEFINES) $(INCPATH) -i $< -o $@
This guarantees that make will run the moc before it compiles foo.cpp. You can then put
#include "foo.moc"
at the end of foo.cpp, where all the classes declared in that file are fully known.
Bookmarks