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

Remove hard coded margins added by QGraphicsView::fitInView()

    XMLWordPrintable

Details

    Description

      In QGraphicsView::fitInView(const QRectF &rect, Qt::AspectRatioMode aspectRatioMode)

          // Find the ideal x / y scaling ratio to fit \a rect in the view.
          int margin = 2;
          QRectF viewRect = viewport()->rect().adjusted(margin, margin, -margin, -margin);
      

      The use of a hard coded margin value here should be removed as well as the corresponding adjusted.

      This adds and unwanted, and unexpected margin to scene rect when using QGraphicsview::fitInView()

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            janichol Andy Nichols
            Votes:
            8 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes