qt中文编码 来源:http://www.cublog.cn/u1/59481/showart_1947231.html 前些日子,被编码折磨了一段时间,总结一下Qt中的编码。 【Qt 编码简单实验】 首先,Qt中得QString 类对字符串进行了封装,其内部使用Unicode对传入的串进行编码。这 Read More
posted @ 2017-02-03 07:33 findumars Views(7111) Comments(0) Diggs(0)
串口、TCP、UDP传输中文字符时,先将字符串转内码。客户端接收到数据后,将内码转为字符串就OK了 QByteArray CommonFunction::strToInterCode(constQString &str)//字符串转内码 http://blog.csdn.net/liuguangzh Read More
posted @ 2017-02-03 07:32 findumars Views(3352) Comments(0) Diggs(0)
原文 http://fanzhichao.blog.hexun.com/22330640_d.html 在终端输出彩色信息有点类似于html的语法,即在要输出的文字前加上转义字符。 指令格式如下\033[*m 这里的*就是转义字符,例如我们要输出一段绿色的文字 qDebug("\033[32mHel Read More
posted @ 2017-02-03 07:31 findumars Views(1873) Comments(0) Diggs(1)
1、如何在窗体关闭前自行判断是否可关闭答:重新实现这个窗体的closeEvent()函数,加入判断操作 void MainWindow::closeEvent(QCloseEvent*event){if (maybeSave()){writeSettings();event->accept();}e Read More
posted @ 2017-02-03 07:30 findumars Views(754) Comments(0) Diggs(0)
原文http://mobile.51cto.com/symbian-272563.htm 本文介绍的是Qt 字库移植并能显示中文,需要的字体库文件,一般是多个。具体移植那一个,看你使用的字库是什么了,先来看内容。 AD: 原文http://mobile.51cto.com/symbian-27256 Read More
posted @ 2017-02-03 07:28 findumars Views(953) Comments(0) Diggs(0)