当前位置:网站首页>What if the parameters in QT are structs or custom classes when sending signals?
What if the parameters in QT are structs or custom classes when sending signals?
2022-07-27 09:09:00 【Trendy technology research society】
We usually send signal When , It is estimated that the basic type is used more , Sometimes container types are also used , What if you use structs or class objects ? What do I do ?
And that's where we need to use it qRegisterMetaType Let's declare this class first .
Usage is as follows :
qRegisterMetaType<MyClass>("MyClass")Just put your class name in it . As for where to call , Generally, it can be in main Function , It can also be in the class constructor , All in all , It needs to be declared before the signal call .
边栏推荐
- Huawei machine test question: String transformation minimum string JS
- Matlab 利用M文件产生模糊控制器
- Nutrecipes developed based on arkui ETS
- Deep understanding of Kalman filter (2): one dimensional Kalman filter
- “蔚来杯“2022牛客暑期多校训练营1
- npm install报错 强制安装
- QT uses SQLite to open multiple database files at the same time
- Svg drawing curve
- Babbitt | yuan universe daily must read: Guangzhou Nansha released the "Yuan universe nine" measures, and the platform can obtain up to 200million yuan of financial support
- Aruba学习笔记10-安全认证-Portal认证(web页面配置)
猜你喜欢

"Weilai Cup" 2022 Niuke summer multi school training camp 1

Low cost, low threshold, easy deployment, a new choice for the digital transformation of 48 million + small and medium-sized enterprises
![2040: [Blue Bridge Cup 2022 preliminary] bamboo cutting (priority queue)](/img/76/512b7fd4db55f9f7d8f5bcb646d9fc.jpg)
2040: [Blue Bridge Cup 2022 preliminary] bamboo cutting (priority queue)

Deep understanding of Kalman filter (2): one dimensional Kalman filter

Digital intelligence innovation

NIO this.selector.select()

PVT的spatial reduction attention(SRA)

A survey of robust lidar based 3D object detection methods for autonomous driving paper notes

Rewrite the tensorrt version deployment code of yolox

vscod
随机推荐
坚果天气
音乐体验天花板!14个网易云音乐的情感化设计细节
新年小目标!代码更规范!
Unity3d 2021 software installation package download and installation tutorial
Software testing function testing a full set of common interview questions [function testing - zero foundation] essential 4-1
Pymongo fuzzy query
500 error reporting
CUDA Programming -03: thread level
【Flutter -- GetX】准备篇
js call和apply
async/await的执行顺序以及宏任务和微任务
HUAWEI 机试题:字符串变换最小字符串 js
[acl2020] a novel method of component syntax tree serialization
Hangzhou E-Commerce Research Institute released an explanation of the new term "digital existence"
被三星和台积电挤压的Intel终放下身段,为中国芯片定制芯片工艺
How to upload dynamic GIF map in blog
【每日算法Day 94】经典面试题:机器人的运动范围
Storage and computing engine
linux安装和远程连接mysql记录
Antdesign a-modal自定义指令实现拖拽放大缩小