- The Q_OBJECT macro at the beginning of the class definition is necessary for all classes that define signals or slots.
- Classes that use the Q_OBJECT macro must have moc run on them. This isn’t a problem because qmake automatically adds the necessary rules to the makefile. But if you forget to regenerate your makefile using qmake and moc isn’t run, the linker will complain that some functions are declared but not implemented.
这篇文章发布于 2009年10月20日,星期二,11:40,归类于 c c++, linux。 您可以跟踪这篇文章的评论通过 RSS 2.0 feed。
您可以留下评论,或者从您的站点trackback。