[PyQt] override wheelEvent issue

Vicent Mas uvemas at gmail.com
Wed Jan 23 18:55:20 GMT 2013


On Wed, Jan 23, 2013 at 6:41 PM, Vincent Vande Vyvre
<vincent.vandevyvre at swing.be> wrote:
> Le 23/01/13 17:12, Vicent Mas a écrit :
>> Hi,
>>
>> I have a subclass of QScrollBar and I'd like to customize how it
>> handles the QEvent.Wheel event. My first idea was to override its
>> wheelEvent() method, but this method gets never called when I wheel
>> the scrollbar. If I override the event() method and filter the wheel
>> events then everything goes fine. I'd like to know why my first
>> approach (to override the wheelEvent() method) fails. The attached
>> script shows the problem.
>>
>>
>> TIA
>>
>> Vicent
>>
>> --
>> Share what you know, learn what you don't.
>>
>>
>> _______________________________________________
>> PyQt mailing list    PyQt at riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> Works with Qt-4.6.2 & PyQt-4.7.2
> don't works with Qt-4.8.1 & PyQt-4.9.1
>
> Both are on Ubuntu.
> --
> Vincent V.V.
> Oqapy <https://launchpad.net/oqapy> . Qarte
> <https://launchpad.net/qarte> . PaQager <https://launchpad.net/paqager>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Thanks for the info.

I forgot to mention my versions: Python 2.7.2, Qt 4.7.4, PyQt 4.8.5,
OpenSuSe 12.

So it could be a Qt bug introduced after Qt 4.6.2 or a PyQt bug
introduced after PyQt 4.7.2. Unfortunately (or not) I'm not a C++ guy
and don't know how to check if it is a Qt problem. Could someone
provide some more info, please? If it is a Qt bug I'd like to file an
issue in the Qt bug tracker.

Thanks.


--
Share what you know, learn what you don't.


More information about the PyQt mailing list