01-23-2013 05:32 AM
Hello everybody
I would like to catch the pressure of a touch, is there a way to get it?
With Qt, there is two properties in the touchEvent that can satisfy my demand : pressure and rect
http://doc.qt.digia.com/qt/qtouchevent-touchpoint.
I have search in doc but I have not find anything relevant.
I tried to cast the TouchEvent to Qt's TouchEvent..but I did not succeed...
does anyone could help me?
thank you!
Solved! Go to Solution.
01-23-2013 11:19 PM
01-24-2013 05:46 AM
First, you have to realise that the screen isn't really designed for pressure sensitivity. It isn't a digitizer.
With that said, you can grab sensitivity values from the device's touch events using the Native SDK. You must have missed these, but they are with the native Screen API. This is the Native Development forum so I guess you're using that.
It does seem to work and it gets realistic values too.
SCREEN_PROPERTY_TOUCH_PRESSURE A single integer that indicates the multi-touch pressure associated with the specific event; a property of an event object.
When retrieving or setting this property type, ensure that you have sufficient storage or one integer. This property is only applicable for the following events: events:
01-24-2013 05:54 AM
I had not thought to look for it in BB10. This property is not documented for the PlayBook (which I naïvely assumed the question was regarding). Do you know of documentation for this property on Tablet OS, xsacha?
I suppose it would also know which platform the original question was regarding…
01-24-2013 06:00 AM
It is also in the Playbook documentation. It is listed but has no detail/message attached to it. I remember using it a long time ago (before 'BB10' existed):
01-24-2013 06:06 AM
Good find. That is way too well-hidden to be useful to most people. I certainly don't recall finding it when I looked before.