为什么Typedef在QT5中抛出声明错误?

发布于 2025-02-09 21:22:58 字数 687 浏览 2 评论 0原文

//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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文