Versions of Qt < 4.7 do not have a QString constructor from QChar* without specifying the size of the string. However, since the QString is copy-on-write, the QString object can be passed to the copy constructor of the return value directly!