Important: Please read the Qt Code of Conduct -

wheelEvent is calling twice on MAC.

  • Hello
    I have QScrollArea subclassed object where I set widget with items. I have reimplemented wheelEvent method of QScrollArea where I set the value of verticalScrollBar(). The problem is that on MAC OSX this event is invoked twice on mouse scroll, but when the window is not active it invoked only once.
    any idea why it may be invoked twice?

  • Lifetime Qt Champion


    You need to provide more information.

    What version of Qt ?
    What version of macOS ?
    What hardware are you using ?

  • Qt version is 4.8
    MacOSX version 10.12.5 Siera
    Mac Mini

    I have found a workaround, if I set Qt::WA_NoMousePropagation attribute to scrollarea it is calling only once.

  • Lifetime Qt Champion

    AFAIK, the Qt 4.8 series has no release officially supporting such a recent version of macOS. Therefore you may have surprises. Note that Qt 4 has reached end of life so unless you are locked to that version, you should really consider updating to Qt 5 which is now at it's 5.9.0 release.