×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    49

    Gestures and QGraphicsScene

    Hello,
    I want to use gesture framework, but at the begining I have some problems.
    I have QGraphicsView and QGraphicsScene
    view->addScene(myScene);
    At the myScene threre are few icons(QPixmapItem) . I try recognize QSwipeGesture( click somewhere on gaphicsScene and drag) and after recognizon start some animation (QtKinetic)
    I have done:
    Code:
      view->grabGesture(Qt::SwipeGesture);
    I had hoepe that event would propagate to QGraphicsScene and i have done in myScene
    Code:
    	virtual bool myScene::event(QEvent *event)
    	{
         if (event->type() == QEvent::Gesture)
            do something
         return QGraphicsScene::event(event);
    	}
    unfortunaltelly program does not go to line "do something".
    What I do wrong??

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    49

    Re: Gestures and QGraphicsScene

    maybe anyone has some example od Gestures cooperate with QGraphicsView and QGraphicsObject / QGraphicsItem / QGraphicsWidget? I would be very grateful for any piece of code

  3. #3
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: Gestures and QGraphicsScene

    See this article , In which QGraphicsScene is used,


    http://wiki.forum.nokia.com/index.ph...hicsViewWidget

    Best regards,

  4. #4
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Gestures and QGraphicsScene

    As far as I know gesture work only in some platforms... if you are not getting any gesture events I believe you are not using a supported platform.

Similar Threads

  1. Replies: 9
    Last Post: 2010-02-07, 01:38
  2. Handling telephone call with gestures
    By djsid in forum Symbian
    Replies: 12
    Last Post: 2008-10-07, 15:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×