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

Disabled QGraphicsItem prevents view scroll with mouse wheel

XMLWordPrintable

      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.

        For Gerrit Dashboard: QTBUG-38053
        # Subject Branch Project Status CR V

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

              Created:
              Updated:

                There are no open Gerrit changes