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

QtWebEngine doesn't scale with dpi the same way as a QAbstractScrollArea widget

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.9.1
    • WebEngine
    • None
    • Windows 10

    Description

      When the dpi scaling is between 100-149%, the content of the QWebEngineView will not scale at all (the scrollbar scales correctly). When the dpi scaling is between 150-200%, the content is always scaled to 200% and the scrollbar is scaled higher than it should (if dpi scaling is set to 150%, it seems like the scaling applied is 250%). A QTextEdit (QAbstractScrollArea) doesn't scale that way (exact scale from 100% to 200% for the text and the scrollbar) and it looks bad when you have both side by side.

      The first problem (content scaling) can be bypassed with QWebEnginePage::setZoomFactor but the second one (scrollbar scaling between 150-200%) cannot.

      The attached screenshots have chrome on the left for comparison and a simple Qt project (containing a QWebEngineView and a QTextEdit) on the right.

      Attachments

        1. 100%.PNG
          100%.PNG
          104 kB
        2. 125%.PNG
          125%.PNG
          222 kB
        3. 150%.PNG
          150%.PNG
          138 kB
        4. 200%.PNG
          200%.PNG
          146 kB
        5. project.zip
          1 kB

        Issue Links

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

          Activity

            People

              kkohne Kai Köhne
              mgenessegrenier Mathieu Genesse-Grenier
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes