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

Quick Text: SVG inline images have poor quality on High-DPI displays

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.7.2, 6.8.0 FF
    • 5.15.2, 6.2.4, 6.5.3, 6.6.3, 6.7.0, dev
    • GUI: High-DPI, Quick: Other
    • None
    • All
    • f8f42c929 (dev), e56b8cd17 (6.7)

    Description

      SVG used as inline image in Qt Quick Text control has bad quality on High DPI displays.
      This is a case e.g. on macOS with Retina display or on Windows with screen scale factor more than 100%.

      Currently the code in QQuickText doesn't take into account QWindow's effectiveDevicePixelRatio at all.

      Sample code:
      don't forget to use a screen with DPR > 1.0

      import QtQuick
      import QtQuick.Window
      
      Window {
          visible: true
      
          Column {
              Text {
                  text: '<img src="https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/acid.svg" width="32" height="28""/>'
              }
      
              Image {
                  width: 32
                  height: 28
                  source: 'https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/acid.svg'
              }
          }
      }
      

      Actual result:  on Windows with DPR = 1.75

      Expected result: top image should be the same quality as bottom one 

      Attachments

        Issue Links

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

          Activity

            People

              sorvig Morten Sørvig
              studiosus Vladimir Belyavsky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes