为什么Typedef在QT5中抛出声明错误?
//nothing above
#include <QComboBox>
#include <QCheckBox>
typedef QList<QList<QComboBox*>*> ComboLists;
Typedef在#include区域之后使用,因此不能与其他';令牌错误
这会导致“;”声明错误
C:\Users\Admin\Documents\XML_TV\xmlmessage.h:18: error: invalid declarator before ';' token
In file included from ..\XML_TV\widget.h:8,
from ..\XML_TV\widget.cpp:1:
..\XML_TV\xmlmessage.h:18:45: error: invalid declarator before ';' token
18 | typedef QList<QList<QComboBox*>*> ComboLists;
| ^
清洁项目根本没有帮助。在此错误之前的一天,一切都很好。
//nothing above
#include <QComboBox>
#include <QCheckBox>
typedef QList<QList<QComboBox*>*> ComboLists;
typedef is used right after #include area so it cannot be connected with other ';' token errors
this leads to declaration error with ';'
C:\Users\Admin\Documents\XML_TV\xmlmessage.h:18: error: invalid declarator before ';' token
In file included from ..\XML_TV\widget.h:8,
from ..\XML_TV\widget.cpp:1:
..\XML_TV\xmlmessage.h:18:45: error: invalid declarator before ';' token
18 | typedef QList<QList<QComboBox*>*> ComboLists;
| ^
Cleaning project doesn't helping at all. One day before this error everything worked perfectly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论