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

provide an option to disable QGraphicsView::alignment

    XMLWordPrintable

Details

    Description

      I've placed some invisible items at the edges and corners of the scene rect. They serve as handles to control the size of the scene rect. Overall, this works very good, until I drag them to the border of the viewport. From my understanding, the following happens:
      1. The mouse move event causes the handle to enlarge the scene rect.
      2. QGraphicsView moves its viewport to accommodate the new scene rect.
      3. Then it seems like QGraphicsView notices that the scene has moved under the mouse, and therefore a new mouse move event has to be fired.
      4. Go back to step 1 until stack overflows.
      Step 1 and 3 are desirable behavior, the problem IMO is in step 2. In my distinct use case, it would be best to disable the automatic viewport movement described by QGraphicsView::alignment. I've tried view->setAlignment(0), but that did not work.

      Attachments

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

        Activity

          People

            ylopes Yoann Lopes
            majewsky Stefan Majewsky
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes