Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    SetFontCapitalization does not seem to work?!

    General and Desktop
    1
    1
    993
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      syntech last edited by

      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]

      1 Reply Last reply Reply Quote 0
      • First post
        Last post