Unicode problem
General and Desktop
4
Posts
2
Posters
1.5k
Views
1
Watching
-
hi every body ? i use visual studio 2008 and qt creator 2.5 and Qt library 4.8.2
@
#include <QtGui>int main(int argc, char **argv)
{
QApplication app(argc, argv);QPushButton btn; btn.setText( QString::fromWCharArray(L"شسیسیب") ); btn.show(); return app.exec();
}
@my unicode doesnt work and shown "??????" in window . please help me.tnx
-
You can to code your source file in the UTF-8 and use the QString::fromUtf8() method.
Default VS saves files in other charset.Also read "it":http://qt-project.org/doc/qt-4.8/qtextcodec.html