in Visual studio there is the option in the compiler that you can convert WCHAR to char but i can't find it in QT...
So if there is no compiler option in QT what is the clean way to convert WCHAR to char and vice vesa?
in Visual studio there is the option in the compiler that you can convert WCHAR to char but i can't find it in QT...
So if there is no compiler option in QT what is the clean way to convert WCHAR to char and vice vesa?
The way Visual studio handles unicode is flawed. Use QStrings instead. Have a look at the following static member functions:
QString fromAscii ( const char * str, int size = -1 )
QString fromLatin1 ( const char * str, int size = -1 )
QString fromLocal8Bit ( const char * str, int size = -1 )
QString fromRawData ( const QChar * unicode, int size )
QString fromStdString ( const std::string & str )
QString fromStdWString ( const std::wstring & str )
QString fromUcs4 ( const uint * unicode, int size = -1 )
QString fromUtf8 ( const char * str, int size = -1 )
QString fromUtf16 ( const ushort * unicode, int size = -1 )
QString fromWCharArray ( const wchar_t * string, int size = -1 )
Horse sense is the thing that keeps horses from betting on people. --W.C. Fields
Ask Smart Questions
Bookmarks