Qt: QObject::connect: Cannot queue arguments of type 'XXX'
来源:互联网 发布:高级java工程师强化班 编辑:程序博客网 时间:2024/05/28 15:29
1 开发环境
Win10(64bit)
Qt5.4.2(64bit)
2 错误描述
在不同线程之间通过信号/槽来传递自定义数据类型QList<RootNode>的时候,提示错误:
- QObject::connect: Cannot queue arguments of type 'QList<RootNode>'
- (Make sure 'QList<RootNode>' is registered using qRegisterMetaType().)
3 解决方法
根据参考资料[1]的提示,先包含头文件:
- #include <QMetaType>
- qRegisterMetaType<QList<RootNode>>("QList<RootNode>");
参考资料
[1]QObject::connect: Cannot queue arguments of type "xxx",(Make sure "xxx" is registed using qRegisterMetaType().)原因及解决方法
1 0
- Qt: QObject::connect: Cannot queue arguments of type 'XXX'
- QObject::connect: Cannot queue arguments of type 'XXX'
- [Qt]QObject::connect: Cannot queue arguments of type 'QString&'
- QObject::connect: Cannot queue arguments of type
- QObject::connect: Cannot queue arguments of type "xxx",(Make sure "xxx" is registed using qRegisterM
- 关于QObject::connect: Cannot queue arguments of type"..."
- 关于QObject::connect: Cannot queue arguments of type"..."
- QObject::connect: Cannot queue arguments of type 'cv::Mat'
- QObject::connect: Cannot queue arguments of type 'string'
- QObject::connect: Cannot queue arguments of type 'QList<QMap<QString,QString> >'
- 信号槽传递非Qt库类型参数时,出现QObject::connect: Cannot queue arguments of type 'QUuid'(Make sure 'string' is regi
- Qt:QtQuick Cannot queue arguments of type 'QQmlChangeSet'
- QT信槽编程,QObject::connect: Cannot connect (null)报错的两种成因
- [QT][源码分析]QObject::connect
- Qt QObject::connect 链接次数
- [QT][源码分析]QObject::connect
- QObject::connect: No such slot xxx错误
- QObject::connect: No such slot xxx错误
- android 中的一些资源注解,让编译器帮你检查代码
- srs代码学习(1)--listen建立过程
- SDWebImage 加载图片原理
- 3340数据结构实验之二叉树一:树的同构
- android 读取手机通讯录
- Qt: QObject::connect: Cannot queue arguments of type 'XXX'
- 前端工程化架构实践--多页面
- 属性动画ValueAnimator在自定义View中的使用
- First Steps to Scala
- 在github里创建一个新项目,并且在intellj idea中使用github来做版本控制
- 使用 Python 创建你自己的 Shell(下)
- #233 – DrawingVisual类的一个例子
- 387.First Unique Character in a String
- 如何等一个线程执行完执行另外一个线程,借助FutureTask类