I already set:
graphicsView->setAttribute(Qt::WA_AcceptTouchEvents);
graphicsView->viewport()->setAttribute(Qt::WA_AcceptTouchEvents);
graphicsView->grabGesture(Qt::PinchGesture);
graphicsView->viewport()->grabGesture(Qt::PinchGesture);
And I'm still unable to receive gestures on the sceneEvent
method of a QGraphicsItem
using Qt 5.1, does anyone knows why ?
回答我自己的问题以解决此问题: http : //qt-project.org/forums/viewthread/32600/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.