PDA

View Full Version : Display on console unicode symbol from QChar



Scope
18th July 2016, 18:56
Hi,
is there any way to display QChar on console but as text?

For example I have

const QChar Union{0x22C3};

And now when i want to see this char on console I must cast it to QString

qDebug()<< QString(Union);

so maybe will be better to store all unicode char immediately as const QString?

QString Union(0x22C3);

then I can avoid casting from QChar to QString. But whether then I do not lose more memory? Because sizeof of


const QString Union{0x22C3};
const QChar Union2(0x22C3);

return 8 and 2 respectively so.... what is wrong with this?
Regards,