当前位置:网站首页>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.
边栏推荐
- 【云原生&微服务五】Ribbon负载均衡策略之随机ThreadLocalRandom
- 我的创作纪念日
- 搭建frp进行内网穿透
- postgresql 生成随机日期,随机时间
- [Cloud native and 5G] Microservices support 5G core network
- JSP exception对象简介说明
- 刷题《剑指Offer》day06
- Pytorch学习记录(七):自定义模型 & Auto-Encoders
- [MySQL exercises] Chapter 3 Common data types in MySQL
- SSM integration case study (detailed)
猜你喜欢

全国中职网络安全B模块之国赛题远程代码执行渗透测试 PHPstudy的后门漏洞分析

2019 NeurIPS | Graph Convolutional Policy Network for Goal-Directed Molecular Graph Generation

生成随机数

【云原生与5G】微服务加持5G核心网

【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(下) -- 搜索历史

刷题《剑指Offer》day07

Define event types in Splunk Web

35-Jenkins-Shared library application

0730~Mysql优化

【插值与拟合】
随机推荐
MUI获取相机权限
【MySQL功法】第2话 · 数据库与数据表的基本操作
【pytorch记录】pytorch的分布式 torch.distributed.launch 命令在做什么呢
【Unity】编辑器扩展-03-拓展Inspector视图
SSM整合案例分析(详解)
六、MFC文档类(单文档和多文档)
Small application project development, jingdong mall 】 【 uni - app custom search component (below) - search history
【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(下) -- 搜索历史
A brief introduction to the SSM framework
【MySQL功法】第3话 · MySQL中常见的数据类型
【Unity】编辑器扩展-01-拓展Project视图
SQL语句知识大全
torch分布式训练
7. JS ES6新增语法 new Map详讲,还有一道代码实战案例帮你快上手new Map
[Cloud native and 5G] Microservices support 5G core network
来n遍剑指--09. 用两个栈实现队列
蚂蚁核心科技产品亮相数字中国建设峰会 持续助力企业数字化转型
[Mini Program Project Development--Jingdong Mall] Custom Search Component of uni-app (Middle)--Search Suggestions
Feign介绍
JSP session的生命周期简介说明