Qt中报错error: allocation of incomplete type ‘Ui::xxxxxx‘(XXXXX为界面文件名)
最近在学习qt,创建UI文件,遇到了这个问题,报错:mainwindow.cpp:6:14: error: allocation of incomplete type ‘Ui::MainWindow’mainwindow.h:7:22: note: forward declaration of ‘Ui::MainWindow’,如下图:但是程序是可以运行的,编译也不会报错。只要是操作这个ui->的地方全部都是这种错误,创建别的UI界面文件也是这样的问题。在网上找了好久没有找到解决方案,最后
原创
2020-05-12 15:29:24 ·
9413 阅读 ·
18 评论