随笔 - 49  文章 - 0  评论 - 6  阅读 - 10万
03 2022 档案
Qt文本文件追加
摘要:// 向文本文件尾部追加,如果文件不存在,自动新建void AppendMessage(const QString &fileName, const QString& message) { QFile file(fileName); file.open(QIODevice::WriteOnly | 阅读全文
posted @ 2022-03-08 15:42 朱迎春 阅读(1605) 评论(0) 推荐(0) 编辑
string,QString,opencv,log4cplus与中文
摘要:#include <iostream> #include <opencv2\opencv.hpp> #include <QtCore/QCoreApplication> #include "LogHelper.h" using namespace std; int main(int argc, ch 阅读全文
posted @ 2022-03-01 09:14 朱迎春 阅读(189) 评论(0) 推荐(0) 编辑
QString与文本文件互操作
摘要:// QString与文本文件互操作:#include <QFile> QString s1("ABCD\nEFGH"); QFile file("D:\\Temp\\s1.txt"); if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { 阅读全文
posted @ 2022-03-01 08:59 朱迎春 阅读(92) 评论(0) 推荐(0) 编辑
QString, QByteArray, QDataStream, QStringLiteral 用法验证
摘要:// 要么使用"QStringLiteral",要么使用"#pragma execution_character_set("utf-8")",但不能同时使用。 // 长度是6,宽字符。 QString s(QStringLiteral("ABCD中文")); // b1长度:10,能恢复 QByte 阅读全文
posted @ 2022-03-01 08:13 朱迎春 阅读(379) 评论(0) 推荐(0) 编辑

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

点击右上角即可分享
微信分享提示