[Qt-interest] QWheelEvent (deltas)
Joshua Grauman
jnfo-c at grauman.com
Sat Dec 4 22:15:38 CET 2010
Thanks for the thoughts. I was figuring I would need to use software to
adjust sensitivity. I guess my basic question boils down to wondering if
there are any assumptions I can make. Most importantly, can I make any
assumptions about the deltas? Where do these deltas come from, are they
coded into the actual devices/drivers, or does Qt assign them for
different devices? Are there any specs that specify that they must always
be in multiples of 8, 120, etc. or can they be *any* value?
Thanks
Josh
> On 2010-12-02 Joshua Joshua Grauman wrote:
>
>> Hello all,
>>
>> I am implementing custom scrolling of a QTextEdit in my program and I
>> want it to work for all the different kinds of wheel events out there.
>
>> From the Qt docs: "Most mouse types work in steps of 15 degrees" which
>> emphasis on MOST. That is it is almost certain that you will find other
>> devices which return a different delta() than a multiple of 120. Or
>> even if they send out a multiple of 120, that does not necessarily
>> correspond "to 15 degrees of wheel motion".
>
> Qt doesn't offer you any API to query for a given device the
> "sensitivity". So the best you can probably do is to adjust the
> sensitivity "in software" (read: provide some settings and multiply the
> received delta with some adjustment factor in your code).
>
> Cheers, Oliver
> --
> Oliver Knoll
> Dipl. Informatik-Ing. ETH
> COMIT AG - ++41 79 520 95 22
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list