This question already has an answer here:
I would like to be able to display Unicode in
QGraphicsTextItem (or a subclass of it).
The only way to set text in
QGraphicsTextItem seems to be
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("utf8")); setPlainText("Café Frapé"); QTextCodec::setCodecForCStrings(QTextCodec::codecForName("utf8")); setPlainText("Caf\x00e9 Frap\x00e9");
It seems that no matter what I do (which I am not sure is correct) I do not get the output right...
QGraphicsTextItem support unicode ? Is maybe the
setPlainText function at fault - but then what are the alternatives ? (I looked into
setDocument but it also sets plain text...)
Edit - copying the special characters inside the QGraphicsTextItem works, once on screen, but still unable to place any unicode from code.