[英]How to receive gesture events on a QGraphicsItem?
我已經設定:
graphicsView->setAttribute(Qt::WA_AcceptTouchEvents);
graphicsView->viewport()->setAttribute(Qt::WA_AcceptTouchEvents);
graphicsView->grabGesture(Qt::PinchGesture);
graphicsView->viewport()->grabGesture(Qt::PinchGesture);
而且我仍然無法使用Qt 5.1在QGraphicsItem
的sceneEvent
方法上接收手勢,有人知道為什么嗎?
回答我自己的問題以解決此問題: http : //qt-project.org/forums/viewthread/32600/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.