I would like to use the magnifying glass (U+1F50E) Unicode symbol in a QLineEdit field. I figured out how to use 16-bit unicode symbols using QChar however I have no idea how to use a unicode symbol represented by 5 hex digits.
QLineEdit edit = new QLineEdit();
edit.setFont(QFont("Segoe UI Symbol"));
edit.setText(????);
So far I have tried:
edit.setText(QString::fromUtf8("\U0001F50E"));
Which gave the compiler warning:
warning C4566: character represented by universal-character-name '\UD83DDD0E' cannot be represented in the current code page
and showed up as: ??
I also tried:
edit.setText(QString("\U0001F50E"));
Which gave the compiler warning:
warning C4566: character represented by universal-character-name '\UD83DDD0E' cannot be represented in the current code page (1252)
And also gave: ??
I tried about everything you could try with QChar. I also tried switching the encoding of my CPP file and copying and pasting the symbol in, which didn't work.