Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. SetFontCapitalization does not seem to work?!
Qt 6.11 is out! See what's new in the release blog

SetFontCapitalization does not seem to work?!

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.2k Views 1 Watching
  • 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 Offline
    S Offline
    syntech
    wrote on last edited by
    #1

    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
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved