一、QT中文乱码
目前试了两种方法
一:QStringLiteral
1
|
setWindowTitle(QStringLiteral( "我是中文" ));
|
二:
1
2
|
QTextCodec*codec=QTextCodec::codecForName( "GB18030" );
setWindowTitle(codec->toUnicode( "我是中文" ));
|
一、QT中文乱码
目前试了两种方法
一:QStringLiteral
1
|
setWindowTitle(QStringLiteral( "我是中文" ));
|
1
2
|
QTextCodec*codec=QTextCodec::codecForName( "GB18030" );
setWindowTitle(codec->toUnicode( "我是中文" ));
|