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

Qt 5.15 LTS: Text strikeout positioned wrongly

    XMLWordPrintable

Details

    Description

      See attached screenshots. Qt 6.3 looks good, but Qt 5.15 looks wrong.

      The text itself has an unexpected font-dependent vertical offset; the strikethrough line is then further offsetted from the text.

      import QtQuick 2.15
      import QtQuick.Window 2.15
      
      Window {
          width: 200
          height: 100
          visible: true
      
          Row {
              spacing: 10
      
              Text {
                  text: "hello"
                  font.family: "Cambria Math"
                  font.pointSize: 14
                  font.strikeout: true
              }
      
              Text {
                  text: "hello"
                  font.family: "Gabriola"
                  font.pointSize: 14
                  font.strikeout: true
              }
      
              Text {
                  text: "hello"
                  font.family: "Arial"
                  font.pointSize: 14
                  font.strikeout: true
              }
          }
      }
      

      Attachments

        1. qt5-strikeout-bad.png
          qt5-strikeout-bad.png
          4 kB
        2. qt6-strikeout-good.png
          qt6-strikeout-good.png
          5 kB
        3. notepad.png
          notepad.png
          6 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes