当前位置:网站首页>qt pass custom structure parameters in different threads
qt pass custom structure parameters in different threads
2022-07-31 09:02:00 【come on, dude】
If the functions of the qt program are all in the main thread, the custom structure can be passed.
eg
struct Student{QString name;int ID;}//Assume from form a to form b, all in the main threadconnect(a,&A::sSendStudent,b,&B::receiverStudent);//This can be passed.But when different threads can not pass.
This problem occurs
QObject::connect: Cannot queuearguments of type 'Student'Solution
Include in the file that sends the signal
#include Then add in the constructor:
qRegisterMetaType<Student>("Student");For the record only.
边栏推荐
- 【Unity】编辑器扩展-04-拓展Scene视图
- A, MySQL principle of master-slave replication
- 2019 NeurIPS | Graph Convolutional Policy Network for Goal-Directed Molecular Graph Generation
- 哪些字符串会被FastJson解析为null呢
- matlab常用符号用法总结
- Flink1.15源码阅读flink-clients——flink命令行帮助命令
- Flutter Paystack implements all options
- ecshop安装的时候提示不支持JPEG格式
- 7. JS ES6新增语法 new Map详讲,还有一道代码实战案例帮你快上手new Map
- UE4插件软链接(关联)
猜你喜欢
随机推荐
SSM framework explanation (the most detailed article in history)
Define event types in Splunk Web
How to restore data using mysql binlog
JSP application对象简介说明
Cloud server deployment web project
【Unity】编辑器扩展-04-拓展Scene视图
postgresql 生成随机日期,随机时间
利用frp服务器进行内网穿透ssh访问
postgresql 范围查询比索引查询快吗?
02 Truffle TutorialToken 示例
C# 正则表达式汇总
UE4插件软链接(关联)
MySQL 日期时间类型精确到毫秒
Feign介绍
spark过滤器
【MySQL功法】第4话 · 和kiko一起探索MySQL中的运算符
混合型界面:对话式UI的未来
SSM框架讲解(史上最详细的文章)
【小程序项目开发 -- 京东商城】uni-app 商品分类页面(下)
Andoird开发--指南针(基于手机传感器)









