天天看点

一、variable `xxx' has initializer but incomplete type

程序段:

void MainWindow::testDemo()
{
    QObject *obj = new QPushButton;
    const QMetaObject *meta= obj->metaObject();
    QMetaClassInfo info = meta->classInfo(0);
    cout << info.name() <<endl;
}      

报错如下:

错误:

variable `xxx’ has initializer but incomplete type

原因:

解决办法:

继续阅读