Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-90840

QSyntaxHighlighter does not apply capitalization with QTextCharFormat::setFontCapitalization

    XMLWordPrintable

    Details

    • Platform/s:
      Windows
    • Commits:
      5fa80f6cd792d0f7ead782037b9870796de05acb (qt/qtbase/dev) 2334a452b9e5f6e17f36d9462d8a949670f33642 (qt/qtbase/6.1) fd63d2ef370526f77ed24a5651e9b9c00eb02263 (qt/tqtc-qtbase/5.15)

      Description

      QSyntaxHighlighter does not apply capitalization with QTextCharFormat::setFontCapitalization.
      This is apparent in the example provided. The example is edited version of the Qt's highlighter example.

      How to replicate the problem:
      1. Build and run the provided example project with Qt version 5.15.0 or 5.15.2 or 6.0.0.
      2. Write for example: "QMenu" into TextEdit.
      3. The other properties of QTextCharFormat are visualized, but capitalization won't be visualized.

      4. One can also test the commented code in line 141, only underline takes effect. So, capitalization won't be applied using QFont::setCapitalization either.

      When tested QTextCharFormat::setFontCapitalization worked in general level, so the problem seems to be specific to QSyntaxHighlighter.

        Attachments

        For Gerrit Dashboard: QTBUG-90840
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            allan.jensen Allan Sandfeld Jensen
            Reporter:
            foxxx Tuukka Kettunen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes