It strikes me that that function only works by accident rather than design. It is returning a pointer to a destroyed stack array.

Anyway, QString has functions QString fromUtf16()/QString::utf16() and QString::fromWCharArray()/QString::toWCharArray() for dealing with these strings.

Include your header (may require INCLUDEPATH variable), link your library into your project (LIBS variable) and use the QString functions.