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:
view->grabGesture(Qt::SwipeGesture);
view->grabGesture(Qt::SwipeGesture);
To copy to clipboard, switch view to plain text mode
I had hoepe that event would propagate to QGraphicsScene and i have done in myScene
virtual bool myScene
::event(QEvent *event
) {
if (event
->type
() == QEvent::Gesture) do something
}
virtual bool myScene::event(QEvent *event)
{
if (event->type() == QEvent::Gesture)
do something
return QGraphicsScene::event(event);
}
To copy to clipboard, switch view to plain text mode
unfortunaltely program does not go to line "do something".
What I do wrong??
Bookmarks