摘要: #chatgpt 1.获取时间戳 #include <QDateTime> #include <QDebug> qint64 timestamp = QDateTime::currentDateTime().toSecsSinceEpoch(); qDebug() << "当前时间戳:" << ti 阅读全文
posted @ 2023-03-20 13:47 simp00 阅读(1679) 评论(0) 推荐(0) 编辑
摘要: #chatgpt #include <QJsonDocument> #include <QJsonObject> #include <QDebug> // 从 JSON 字符串中解析数据 void parseJson(const QString& jsonString) { // 将 JSON 字符 阅读全文
posted @ 2023-03-20 13:38 simp00 阅读(42) 评论(0) 推荐(0) 编辑
摘要: #chatgpt结果 #include <QUuid> #include <QDebug> int main() { // 生成一个新的 UUID QUuid uuid = QUuid::createUuid(); // 将 UUID 转换为字符串,并打印输出 QString uuidString 阅读全文
posted @ 2023-03-20 10:05 simp00 阅读(950) 评论(0) 推荐(0) 编辑
摘要: #chatgpt 结果 ##head // TcpServerBase.h #ifndef TCPSERVER_H #define TCPSERVER_H #include <QObject> #include <QTcpServer> #include <QTcpSocket> class Tcp 阅读全文
posted @ 2023-03-20 09:02 simp00 阅读(64) 评论(0) 推荐(0) 编辑
摘要: #chatgpt结果 string #include <QCryptographicHash> #include <QDebug> QString string = "Hello, World!"; QByteArray data = string.toUtf8(); QByteArray hash 阅读全文
posted @ 2023-03-20 09:00 simp00 阅读(149) 评论(0) 推荐(0) 编辑