Search code examples
c++qtqstringwchar

Convert WCHAR to QString in Qt


Convert WCHAR to QString in Qt. Please help me to implement it to complete this convertion.


Solution

  • There are to/from WCharArray methods that are static members of QString:

    http://doc.qt.io/qt-4.8/qstring.html#fromWCharArray

    http://doc.qt.io/qt-4.8/qstring.html#toWCharArray