The dropdownlists in QGIS form has an advanced action behaviour i.e. the items in a dropdownlist are getting scrolled while we scroll the mouse wheel by focusing over the control.

I don't want this behaviour and I need to disable this. Is there any existing plug-in to achieve this? or give me suggestions on this.


  • please consider marking the solution as answered if it resolved your issue..
    – vinayan
    Aug 3, 2012 at 15:19

1 Answer 1


I believe the behavior you are referring to is when you are scrolling a long form layout that contains certain widgets, e.g. combo boxes, with the mouse wheel and when the mouse hovers over those widgets the scroll wheel changes its value instead of continuing to scroll the layout.

QGIS uses the Qt GUI toolkit and this behavior is a 'feature' on some platforms and considered a 'bug' on others. Specially, it is very much non-standard Mac OS X GUI behavior:


If you are creating your own form for a PyQGIS plugin, you can fix this by subclassing the Qt widget and reimplementing its wheelEvent:


Just setting the focus for the widget to something non-wheel does not fix the issue. Installing an event filter on the widget will also work, but may slow down the responsiveness of your GUI.

As far as the widgets in QGIS go, every one of them that exhibits the behavior would need to be subclassed to take care of this Qt-specific issue, which will probably not be happening anytime soon. The issue really needs to be addressed by the Qt project and for particular platforms where it is non-standard behavior.

  • Thanks Larry!! The scenario which you said in the answer is exact issue what I am facing. Brillant.
    – vasudevanp
    Aug 3, 2012 at 11:49
  • Your detailed answer makes me very comfortable and I am getting that we can create a python QGIS plug-in to resolve the issue. But I am new to QGIS and never worked on QGIS customization. It would be very helpful to me if someone provide a plug-in which has the required functionality available. Thanks.
    – vasudevanp
    Aug 3, 2012 at 12:00
  • 1
    You could create a custom form if you want more control over the layout woostuff.wordpress.com/2011/09/05/…
    – Nathan W
    Aug 3, 2012 at 13:23
  • 1
    Vasu, you can create a custom feature-editing form, like Nathan suggested, or your own plugin and have control over the wheel events of the widgets used in your Qt form layouts. However, I doubt creating a plugin that affects all of QGIS's form widgets is a reasonable approach (unless it's just a small number). One would have to install many event filters, which would not be prudent. The fix for QGIS's widgets should come from Qt. Otherwise, one would have to edit the C++ source of QGIS and subclass every type of widget that exhibits the problem, which I doubt any developers would do.
    – dakcarto
    Aug 3, 2012 at 18:25
  • 2
    Any news on this ? I don't see it being a Mac specific Issue. I'm on Linux and this feature leads to many accidental property changes when trying to navigate the window. Feb 28, 2020 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.