Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

SetFontCapitalization does not seem to work?!



  • Hello!

    I've tried to modify the RichText highlighter Example which works great so far. Except that setFontCapitalization() does not do anything.

    Here's what I tried:
    @keywordFormat.setForeground(Qt::blue);
    keywordFormat.setFontCapitalization(QFont::Capitalize);
    @
    Later in @void Highlighter::highlightBlock(const QString &text)@ (which is more or less unmodified) @setFormat(index, length, rule.format);@ is called;

    The text in my textEdit Widget is shown blue, so the RegEx and setForeground() works, but it is not converted to uppercase?! Any ideas what is wrong?

    [Edit: @-tags for code snippets added /Vass]


Log in to reply