On November 10, 2004 12:21 pm, tj wrote:
> I am trying to learn how to use Qt after years of using xforms for X
> apps. I went through the cannonball game tutorials and then started
> playing on my own, especially with QTextEdit. I overrode ::append to do
> some testing and that was ok. But, when I tried to add a new slot the
> trouble began.
> First I didn't put Q_OBJECT in the class declaration and got a runtime
> message saying the connect failed. Ok, then I added Q_OBJECT and got the
> "undefined reference to 'vtable for mtTextEdit' error.
> I removed Makefile and the .pro file and reran
> qmake -project
> before building. Which, according to my research on other posts, should
> take care of the meta code compiling.
Are you SURE that you did this AFTER adding the Q_OBJECT reference? Try
deleting the existing Makefiles, then redoing it.
If that doesn't work, make sure it is creating and linking the moc file for
List archive and information: http://lists.trolltech.com/qt-interest/