当前位置:网站首页>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.
边栏推荐
猜你喜欢
![[Cloud native and 5G] Microservices support 5G core network](/img/c9/4ccacd1e70285c2ceb50c324e5018c.png)
[Cloud native and 5G] Microservices support 5G core network

MySQL 高级(进阶) SQL 语句 (一)

How to upgrade nodejs version
![[Cloud native] Introduction and use of Feign of microservices](/img/39/05cf7673155954c90e75a8a2eecd96.jpg)
[Cloud native] Introduction and use of Feign of microservices

一、MySQL主从复制原理

状态机动态规划之股票问题总结

Feign介绍

How on one machine (Windows) to install two MYSQL database

关于挂载EXfat文件格式U盘失败的问题

【MySQL功法】第5话 · SQL单表查询
随机推荐
SSM framework explanation (the most detailed article in history)
【MySQL功法】第4话 · 和kiko一起探索MySQL中的运算符
我的创作纪念日
Scala基础【seq、set、map、元组、WordCount、队列、并行】
【TCP/IP】网络模型
安装sambe
A, MySQL principle of master-slave replication
Small application project development, jingdong mall 】 【 uni - app custom search component (below) - search history
【Excel】生成随机数字/字符
【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(下) -- 搜索历史
MUI获取相机权限
JSP response,request操作中(中文乱码)-如何解决呢?
MySQL 视图(详解)
傅里叶变换,拉普拉斯变换学习记录
剑指offer-解决面试题的思路
JS中原型和原型链的详细讲解(附代码示例)以及 new关键字具体做了什么的详细讲解
How to Install MySQL on Linux
【云原生】微服务之Feign的介绍与使用
哆啦a梦教你页面的转发与重定向
全国中职网络安全B模块之国赛题远程代码执行渗透测试 PHPstudy的后门漏洞分析