Not sure I understand why this won't compile: int unicodeValue = func_that_returns_a_unicode_value(); QString s(QChar(unicodeValue)); const QByteArray& utf8 = s.toUtf8(); // <-- error happens here I get: error: request for member 'toUtf8' in 's', which is of non-class type 'QString(QChar)' I'm confused as hell :P