[SailfishDevel] Mouse events with emulator
Martin Kampas
martin.kampas at jolla.com
Mon Mar 6 07:20:59 UTC 2017
Hello Костадин Дамянов,
I am not expert in this area so this is just my opinion:
Touch events are the only "native" events on a (hardware) device with touchscreen as the only pointing device. For compatibility with older widgets "By default, QGuiApplication translates the first touch point in a QTouchEvent into a QMouseEvent."[1]. Nothing more. Sailfish OS Emulator currently does not emulate eny device with other than touchscreen pointing device.
So IMO what you want is not likely to be possible.
I suggest you to describe your case in more detail - someone could than advice you a better solution.
BR,
Martin
[1] http://doc.qt.io/qt-5/qtouchevent.html#event-delivery-and-propagation
________________________________
From: Devel [devel-bounces at lists.sailfishos.org] on behalf of Костадин Дамянов [maxmight at gmail.com]
Sent: Sunday, March 05, 2017 2:44 PM
To: devel at lists.sailfishos.org
Subject: [SailfishDevel] Mouse events with emulator
Hello.
I am developing an application an I have noticed that with the emulator the application only receives only QEvent::TouchBegin and QEvent::TouchEnd events.
Is there a way to receive QEvent::MouseButtonPress, QEvent::MouseMove and QEvent::MouseButtonRelease events when working with the emulator?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20170306/ca04ead2/attachment.html>
More information about the Devel
mailing list