Don't accept wheel events if sendEvent() returns false.
Otherwise wheeling over disabled items won't let the wheel event propagate to the parent. An easy way to reproduce the problem is by having a flickable with some disabled item in it. Task-number: QTBUG-33477 Change-Id: Ib327cc34dd9f415617ffbc41064f689507446c05 Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>bb10
parent
e2557933cb
commit
f59e29d9bf
|
|
@ -4147,8 +4147,9 @@ void QGraphicsScene::wheelEvent(QGraphicsSceneWheelEvent *wheelEvent)
|
|||
wheelEvent->widget()));
|
||||
wheelEvent->accept();
|
||||
bool isPanel = item->isPanel();
|
||||
d->sendEvent(item, wheelEvent);
|
||||
if (isPanel || wheelEvent->isAccepted())
|
||||
bool ret = d->sendEvent(item, wheelEvent);
|
||||
|
||||
if (ret && (isPanel || wheelEvent->isAccepted()))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue