//for starf study
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include<QDebug>
#include<QVariant>
#include<QJsonObject>
//QVariant类就像最常见的Qt数据类型的并集。union { char c; int i;double d;QString ;QDate;..}data;
//union联合体中包含所有自带的基本类型
//QVariant类管理着这样一个union
typedef struct MyCustomStructStruct{
QString name;
int age;
}MyCustomStruct;
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
,
QVariant方法功能(QT5.12)
最新推荐文章于 2024-06-27 14:39:09 发布
本文深入探讨了QVariant类的功能及应用,包括不同类型的初始化、转换方法、有效性检查等,为Qt开发者提供了实用指南。

最低0.47元/天 解锁文章
2206

被折叠的 条评论
为什么被折叠?



