当前位置:编程学习 > wap >>

char * to QString?

char * to QString?  --------------------编程问答-------------------- tr(char* ) --------------------编程问答-------------------- Char*转化为Qstring:
        char buf[1024];
QString str(buf); //或者str = buf;
--------------------编程问答-------------------- 建议楼主看一下dbzhang800的博客就会完全明白的。
http://blog.csdn.net/dbzhang800/article/details/7517422 --------------------编程问答-------------------- QString::fromlocal8bit(char*,charsize); --------------------编程问答-------------------- 楼上正解!!! --------------------编程问答-------------------- http://hi.baidu.com/fsx92/item/385a8973d0b7ef1ad0dcb3f0 --------------------编程问答-------------------- fileSystem[i]= QString::fromLocal8Bit(parTmp->m_ThisPartiton->FileSystem , -1);
不知道为啥不行。 --------------------编程问答-------------------- const char *cstr;
QString qstr= QString(QLatin1String(cstr));
补充:移动开发 ,  Qt
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,