2009年10月7日 星期三

QTextCodec 改變文字編碼以解決亂碼問題

假設你的原文件是utf8編碼,
#include < qtextcodec >

QTextCodec * BianMa = QTextCodec::codecForName ( "utf8" );
textLabel1->setText(BianMa->toUnicode("我愛妳!"));

QUrl 路徑格式解析