当前位置:网站首页>QT notes - custom data types
QT notes - custom data types
2022-07-24 12:07:00 【Cool breeze in the old street °】
1. When we send data by thread , We often encounter the following situations :
Translated into :
QOject::connect Cannot type QVector<int> Parameters of the queue ( Please make sure QVector<int> Registered qRegisterMetaType)
Help document :
So we try to use qRegisterMetaType To register our customized data
// Register custom data
qRegisterMetaType<QVector<int>>("QVector<int>");
2. When we use QVariant When using custom data , We often encounter the following situations :
Help document :
Set the custom type to QVariant, We usually use Q_DECLARE_METATYPE This macro , Need to be defined outside the class , It takes effect after this custom type , Otherwise, an error will be reported
struct Person
{
QString name;
int age;
int score;
QString className;
};
Q_DECLARE_METATYPE(Person)
边栏推荐
- 生信周刊第37期
- scrapy-redis写项目备忘
- Hash - 1. Sum of two numbers - some people fall in love during the day, some people watch the sea at night, and some people can't do the first question
- 基于ARM和FPGA的数字示波器设计——QMJ
- Source code analysis sentry user behavior record implementation process
- Share the typora tool
- Use and expansion of fault tolerance and fusing
- L1-043 阅览室
- MySql的DDL和DML和DQL的基本语法
- Hash - 242. valid alphabetic ectopic words
猜你喜欢
![Operational amplifier - Notes on rapid recovery [II] (application)](/img/fd/e12f43e23e6ec76c2b44ce7813e204.png)
Operational amplifier - Notes on rapid recovery [II] (application)

Easy to use example

6k+ star,面向小白的深度学习代码库!一行代码实现所有Attention机制!
![Operational amplifier - Notes on rapid recovery [1] (parameters)](/img/1f/37c5548ce84b6a217b4742431f1cc4.png)
Operational amplifier - Notes on rapid recovery [1] (parameters)

字符串匹配的KMP

Miss waiting for a year! Baidu super chain digital publishing service is limited to 50% discount

Svn server and client installation (Chinese package) and simple use

生信周刊第37期

3、 Implementation principle of MFC message mapping mechanism

Qt5.12 + vs2019 cannot locate the program input point in the dynamic link library
随机推荐
MOS tube - Notes on rapid recovery application (I) [principle]
计算两个坐标经纬度之间的距离(5种方式)
动态内存管理
oracle 11.2.0.4 asm单实例不随系统启动而自动开启
Grep actually uses ps/netstat/sort
Experience of redis deepwater area -- Interview reference
第0章 前言和环境配置
MySql的DDL和DML和DQL的基本语法
Using huggingface model to translate English
6k+ star,面向小白的深度学习代码库!一行代码实现所有Attention机制!
Use of multithreading in QT
Blue team resource collection
离散分布常用公式及应用场景
[rust] Why do I suggest you learn rust | a preliminary study of rust
String -- 344. Reverse string
微信公众号开发:素材管理(临时、永久)
08.01 adjacency matrix
How to use a third party without obtaining root permission topic: MIUI chapter
Repeated calls, messages, idempotent schemes, full collation
4*4图片权重的收敛规则