[Qt-interest] QGraphicsScene and multitouch events
Sean Hayes
sean.t.hayes at vanderbilt.edu
Wed Jan 5 23:48:46 CET 2011
Oliver,
I am not sure what the problem could be. Maybe you could include your code
or post it to the forum thread. I would test my code on a OS X but I do not
have access to a mac. I believe that after the touch events created no OS
specific code is used. At least Qt's gesture recognizer classes do not seem
use any OS specific code. Mysterious issue you have there.
Sean
On Wed, Jan 5, 2011 at 8:12 AM, <Oliver.Knoll at comit.ch> wrote:
> Hi Sean,
>
> On 2011-01-04 Sean Sean Hayes wrote:
>
> > To get gestures to work in a QGraphicsView (in the scene) you have to
> > do the following:
> > ...
> > You can also check out this forum post.
> > http://www.qtcentre.org/threads/31582-
> > Gestures-and-QGraphicsScene?p=172577.
>
> I am exactly in the same situation, but I also could not get gestures to
> work in QGraphicObject based items! I followed all the steps (thanks for the
> qtcentre post! Was a great help ;), I do get the touch begin event inside my
> QGraphicsObject based instance, but no gesture events!
>
> If however I handle the gesture events inside the QGraphicsScene instance
> that works. Unfortunately then I hit another bug:
> http://bugreports.qt.nokia.com/browse/QTBUG-16281: "Pan Gesture swallowed
> in QGraphicsView when mouse over item". I was hoping I could work around
> that bug by adding an "invisible"(1) QGraphicsObject which would handle the
> gesture events instead, e.g. as parent for each QGraphicsPixmap item I have
> in my scene.
>
> (1) Note that I did explicitly /not/ set setVisible(false), because I
> understand the item would then receive no events at all (
> http://doc.qt.nokia.com/4.7//qgraphicsitem.html#setVisible) - instead I
> set the flag QGraphicsItem::ItemHasNoContents (but off course I also tried
> without this flag, as well as all wird combinations
> accepting/ignoring/grabbing touch events in the scene/view/other items).
>
> I will yet have to come up with a simple example and file a bug report
> accordingly. I must admit I experimented with my existing code, so chances
> are I did something else wrong, but your explanations seemed to be simple
> enough as not to make any mistake.
>
> I am on Qt 4.7.1 on a MacBook Pro with Mac OS 10.6.5 - again Gestures work
> when handled on a Scene level, so Gestures are definitively supported on my
> platform - it is just the QGraphicsObject which does not seem to receive
> them!
>
> Cheers, Oliver
> --
> Oliver Knoll
> Dipl. Informatik-Ing. ETH
> COMIT AG - ++41 79 520 95 22
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110105/0f991ab6/attachment.html
More information about the Qt-interest-old
mailing list