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

Disabled QGraphicsItem prevents view scroll with mouse wheel

    XMLWordPrintable

    Details

      Description

      Usually, you can scroll a QGraphicsView with the mouse wheel, if the mouse cursor is within the view widget. But is the cursor is right above a disabled QGraphicsItem (in my case, the cursor is a child item, whose PARENT is disabled), the mouse wheel does not scroll the view, although none of my widgets overloads the wheelEvent method.
      It seems like the disabled item "accepts" the wheelEvent (possibly other events, too?) when it shouldn't (maybe to prevent that the event is passed to the item behind, is this intended?).

      My personal fix: reimplement wheelEvent in the scene and call ignore() on the event. None of my items uses that event, so I don't have to care about passing the event further.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              bibr Andreas Aardal Hanssen
              Reporter:
              tenry Simon Burchert
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes