[Development] Source incompatible Qt 5 change: Removing the QTouchEvent::TouchPoint::Primary flag

Samuel Rødal samuel.rodal at nokia.com
Fri Jan 13 09:34:36 CET 2012


On 01/12/2012 02:46 PM, ext Thiago Macieira wrote:
> On Thursday, 12 de January de 2012 14.26.41, Samuel =?ISO-8859-1?Q?R=F8dal?=
> wrote:
>> Hello,
>>
>> I'd like to remove the QTouchEvent::TouchPoint::Primary flag, as per
>> change request http://codereview.qt-project.org/#change,12928
>>
>> The current purpose of the flag is simply to note that a touch point is
>> duplicated as a mouse event by the windowing system (to prevent Qt from
>> also generating a synthesized mouse event from that touch event). The
>> linked change moves this duplication logic out of the windowing system
>> interface (platform plugins, generic plugins, etc), and into QtGui.
>>
>> If we kept it as always returning false it could mask incorrect behavior
>> in the user application.
>
> I didn't get it.
>
> Will there be touch points duplicated as mouse events?
>
> If so, is the user supposed to know about that?
>
> And if so, how does the user know about it?

There already is in Qt 4, it's handled by QWidget::event().

In Qt 5 it's the currently platform or generic plugin that sends both 
touch events and mouse events, which is less ideal.

With my patch (linked above) it's handled in QtGui, so that it first 
tries to send the touch event, and if that's ignored, it sends a mouse 
event. QtWebKit relies on this behavior for example.

The new thing from Qt 4 is that I added two application attributes to 
enable / disable these synthetic events.

--
Samuel



More information about the Development mailing list