Qt: Signals and slots Error: undefined reference to `vtable for

前端 未结 5 741
走了就别回头了
走了就别回头了 2020-12-03 16:54

Following example from this link: http://developer.kde.org/documentation/books/kde-2.0-development/ch03lev1sec3.html

#include 
#include 

        
5条回答
  •  醉梦人生
    2020-12-03 17:42

    Based on andref comment just above, when everything is in one cpp file like stuff.cpp, you need to add at the end of the file:

    #include "moc_stuff.cpp"
    

    (this is with Qt 4.7.0)

提交回复
热议问题