[Interest] Qt 5.7 QuickControls 2 are not multitouch??

Nuno Santos nunosantos at imaginando.pt
Mon May 1 22:28:46 CEST 2017


Thanks for sharing. It seems that I was missing the this->setAcceptedMouseButtons(Qt::LeftButton);

I will try and I will let know about the outcome. 

Regards,

Nuno

> On 1 May 2017, at 16:46, Jean-Michaël Celerier <jeanmichael.celerier at gmail.com> wrote:
> 
> Nuno Santos I just did this : https://github.com/jcelerier/qml-creative-controls/blob/master/src/toucharea.cpp <https://github.com/jcelerier/qml-creative-controls/blob/master/src/toucharea.cpp> and it worked for my use case (I just need one finger per widget).
> 
> 
> 
> -------
> Jean-Michaël Celerier
> http://www.jcelerier.name <http://www.jcelerier.name/>
> On Mon, May 1, 2017 at 3:38 PM, Nuno Santos <nunosantos at imaginando.pt <mailto:nunosantos at imaginando.pt>> wrote:
> Hey,
> 
> I was never successful extending QQuickItem to override touchEvent and handle then on the C++.
> 
> that’s what I was trying to say on previous email that Shawn Rutledge replied to me and I forgot to reply to him.
> 
> What exactly must done (the minimal necessary steps), to have a QQuickItem responding to touchEvents on the C++ side?
> 
> Can you please point an example or explicitly say here the minimal amount of code to make it do it? I simply can’t! :(
> 
> Regards,
> 
> Nuno
> 
> 
> 
>> On 1 May 2017, at 11:15, Jean-Michaël Celerier <jeanmichael.celerier at gmail.com <mailto:jeanmichael.celerier at gmail.com>> wrote:
>> 
>> > You can reimplement QQuickItem::touchEvent() to handle touch events. See QTouchEvent docs for the details.
>> 
>> Thanks. I guess there's not a similar way if one wants to stay in the QML realm ? 
>> 
>> Best
>> Jean-Michaël
>> 
>> 
>> 
>> On Mon, May 1, 2017 at 8:24 AM, J-P Nurmi <jpnurmi at qt.io <mailto:jpnurmi at qt.io>> wrote:
>> > On 1 May 2017, at 01:31, Jean-Michaël Celerier <jeanmichael.celerier at gmail.com <mailto:jeanmichael.celerier at gmail.com>> wrote:
>> >
>> > Bump.
>> >
>> > Even if Qt Quick Controls 2.0 are apparently gaining this feature in 5.9.0, how would one go when writing custom QQuickItem, if multiple distinct items have to be able to receive touch events simultaneously ?
>> 
>> Hi,
>> 
>> You can reimplement QQuickItem::touchEvent() to handle touch events. See QTouchEvent docs for the details.
>> 
>> - http://doc.qt.io/qt-5/qquickitem.html#touchEvent <http://doc.qt.io/qt-5/qquickitem.html#touchEvent>
>> - http://doc.qt.io/qt-5/qtouchevent.html <http://doc.qt.io/qt-5/qtouchevent.html>
>> 
>> PS. Unlike for QWidgets and QGraphicsItems, there is no need to explicitly enable touch events for QQuickItems.
>> 
>> --
>> J-P Nurmi
>> 
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org <mailto:Interest at qt-project.org>
>> http://lists.qt-project.org/mailman/listinfo/interest <http://lists.qt-project.org/mailman/listinfo/interest>
>> 
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org <mailto:Interest at qt-project.org>
>> http://lists.qt-project.org/mailman/listinfo/interest <http://lists.qt-project.org/mailman/listinfo/interest>
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170501/4759d561/attachment.html>


More information about the Interest mailing list