QTextBrowser display special char issue
-
Hi! I want to replace - (dashes) with • (bullets) in the
QTextBrowsertext.ui->textBrowser->setText(QString("-ABCD").replace("-", "\0x2022"));It displays text without any special character. How to fix it? Thanks.
-
I have fixed it by replacing
"\0x2022"to"\u2022"withQStringLiteralmacro.Code:
ui->textBrowser->setText(QString("-ABCD").replace("-", QStringLiteral("\u2022")));Now all works well.