QTouchEvent无法捕获
bool Knob::sceneEvent(QEvent *event)
{
qDebug()<<event->type();
switch (event->type()) {
case QEvent::TouchBegin:
case QEvent::TouchUpdate:
case QEvent::TouchEnd:
{
QTouchEvent *touchEvent = static_cast<QTouchEvent *>(event);
……
break;
}
default:
return QGraphicsItem::sceneEvent(event);
}
return true;
}