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

QGraphicsScene::items() mishandles items flagged with ItemIgnoresTransformations

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Invalid
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.4.1
    • Widgets: GraphicsView
    • None

      A real-world test case is the Qt Creator's qml designer module.

      1. Open any qml file in the designer
      2. Select any item
      3. Zoom in and notice that the resize handles have a larger "hitbox" than their graphical size.
      4. Zoom out and notice that the resize handles are very difficult to click (since their hitbox is now smaller).

      In essence, QGraphicsScene::items treats these items as transformed.

      I've added some debugging code in FormEditorScene::mouseMoveEvent, and I've found that when zoomed in,

      items(event->scenePos())[0]>contains(event>scenePos())

      returns false.

      Everything works consistently (but not in a useful way) when I remove the ItemIgnoresTransformations flag from the resize handles.

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

            thohartm Thomas Hartmann
            anszom Andrzej Szombierski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes