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

QGraphicsPixmapItem::boundingRect does not respect devicePixelRatio

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.2.1
    • Fix Version/s: 5.3.0 Beta1
    • Component/s: Widgets: GraphicsView
    • Labels:
      None
    • Environment:
      OS X 10.8.5 (Mountain Lion) (but should be reproducible on any platform)
    • Commits:
      ffc8aac684e97bad1fb598883fa05ae66f7f1e4c

      Description

      The bounding rectangle as returned by QGraphicsView::boundingRect() does not seem to take the device pixel ratio into account, as reported by QPixmap::devicePixelRatio().

      How to reproduce:

      • Compile the attached example code (qmake;make)
      • Run HiDPIPixmapGraphicsView.app
      • BUG: The pixmap is properly scaled (original size: 512x512 pixels - that is, on a normal (non-HiDPI) monitor it appears as 256x256 pixel equivalent image), but the bounding box (drawn as red rectangle) is not

        Attachments

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

          Activity

            People

            • Assignee:
              sorvig Morten Sørvig
              Reporter:
              till213 Oliver Knoll
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes