[Qt-interest] Thoughts about QGestures

Thiago Macieira thiago at kde.org
Tue May 18 12:26:28 CEST 2010


Em Terça-feira 18 Maio 2010, às 08:50:53, Guido Seifert escreveu:
> yesterday I played a bit with QGestures. When I tried to run the
> imagegestures examples I was at first very surprised that it did nothing
> for me. Somehow I expected that though I have no touch screen it had to
> work with mouse also. After some 'research' I found that QMouseEvents and
> QTouchEvents are two totally different things.

Hi Guido

They're not exactly totally different. Touch events are delivered as mouse 
events if no widget handles the touch event.

> Nevertheless, after some googling I found that I am not the only one who
> fell into this trap. So I'd recomment to make the documentation a little
> bit more clear there.

It's an internal implementation detail. It should be documented, but it may 
change in any new version of Qt.

> Furthermore, would it be impossible to 'enhance' QSwipeEvents and
> QPanEvents so that they work using QMouseEvents and QTouchEvents? I am
> well aware that there are limits to the interchangeability of mouse and
> touchscreen usage, but at least for single touch gestures it should be
> possible. I see no general problem that e.g. the QSwipeEvent could not be
> sent when I swipe with the mouse pointer.

No, that wouldn't be impossible. That enhancement we'd like to do, but haven't 
had the time.

> If you Trolls want to keep your swipe/pan events as simple and clean as it
> is now, which certainly would be a very reasonable decision, would it be
> at least possible that you could provide a
> QMouseSwipeEvent/QMousePanEvent? This would also easily allow to write
> apps, which make no difference between mouse and touch screen gestures.

We're waiting for a contribution.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100518/7c1c9808/attachment.bin 


More information about the Qt-interest-old mailing list