摘要: 11、各种数据类型的相互转换char * 与 const char *的转换char *ch1="hello11";const char *ch2="hello22";ch2 = ch1;//不报错,但有警告ch1 = (char *)ch2;char 转换为 QString其实方法有很多中,我用的是:char a='b';QString str;str=QString(a);QString 转换为 char方法也用很多中QString str="abc";char *ch;ch = str.toLatin1.data 阅读全文
posted @ 2014-03-22 19:45 不吃早饭好不好 阅读(498) 评论(0) 推荐(0) 编辑
摘要: QTextCodec *codec = QTextCodec::codecForName("utf8");QTextCodec::setCodecForLocale(codec);QTextCodec::setCodecForCStrings(codec);QTextCodec::setCodecForTr(codec);QTextCodec::setCodecForTr(QTextCodec::codecForName("GB2312")); 阅读全文
posted @ 2014-03-22 19:42 不吃早饭好不好 阅读(225) 评论(0) 推荐(0) 编辑