Qt struct应用
来源:互联网 发布:淘宝店铺模板修改 编辑:程序博客网 时间:2024/05/21 18:17
#include <QtDebug>
#include <QVariant>
struct Test
{
QString str;
operator QVariant() const
{
return QVariant::fromValue(*this);
}
};
Q_DECLARE_METATYPE(Test)
//qRegisterMetaType<Test>(); //注册 跨线程使用信号槽
inline QDebug operator<< (QDebug debug, const Test& t)
{
debug.nospace() << "Test(" << t.str << ")"; return debug.space();
}
#include <QVariant>
struct Test
{
QString str;
operator QVariant() const
{
return QVariant::fromValue(*this);
}
};
Q_DECLARE_METATYPE(Test)
//qRegisterMetaType<Test>(); //注册 跨线程使用信号槽
inline QDebug operator<< (QDebug debug, const Test& t)
{
debug.nospace() << "Test(" << t.str << ")"; return debug.space();
}
阅读全文
0 0
- Qt struct应用
- struct tm 的应用
- python struct 应用
- struct tm 的应用
- Qt应用
- Qt编写struct提示成员问题
- 【数据结构】typedef struct 和 struct在链表中的应用
- 「linux」struct list_head 应用
- Struct
- struct
- struct
- struct
- Struct
- struct
- struct
- struct
- struct
- struct
- 嵌入式Linux开发流程
- CSS(三十二)
- 动态规划入门篇
- CSS(三十三)
- SHA算法Java实现
- Qt struct应用
- 深入理解 Java G1 垃圾收集器
- python2.6.6升级到python2.7.13
- Running the single-view depth demo
- CSS(三十四)
- 【八中】快速求和(1143 && [CQOI1143])
- PHP数据采集常用的方法
- Qt 持久性序列化
- 使用方法与键盘输入计算5的阶乘