我想为我的Qt页面实现多级继承。Qt中的多级继承
class MyPage1: public QWizardPage {
Q_OBJECT
...
}
and
class MyPage2: public MyPage1 {
Q_OBJECT
...
}
的moc_MyPage2.cc是空的,而连接我得到一个错误:
error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall dsw::MyPage2::metaObject(void)const " ([email protected]@[email protected]@[email protected]@XZ)
是否有人可以指导我?如果没有正确生成的moc文件预计
我将文件MyPage2重命名为MyPage21,并重新启动了Visual Studio,清理并构建了该项目,并且工作正常! – PDH
是啊!即使我在与Visual Studio一起使用Qt时也遇到过链接问题 – DNamto