[Qt-interest] Graphics Item wheel event doubt

David Boddie david.boddie at nokia.com
Wed Jan 21 18:10:20 CET 2009


Ankit Agarwal wrote:

> Now my question is:
> I want to reimplement the wheel event of one of the QGraphicsEllipseItem.
> So, now what will happen when I use my wheel, as in shall the eheel event
> be propagated to the view as well?
> The documant says that if I call QEvent::accept(), then the wheel event
> shall not be passed to the scene and shall be passed to the view.

No, it says, "If no items accept the event, it will be ignored by the scene,
and propagate to the view..."

If just one item accepts the event, it will not be passed to the scene or
the view. If you accept an event, it does not propagate further. If you
are interested, the following documents will tell you all you need to know
about the event system in Qt:

  http://doc.trolltech.com/4.5/eventsandfilters.html
  http://doc.trolltech.com/qq/qq11-events.html

> My requirement is that the wheel event shall not be passed to the view
> also. How can i achive this?

Just accept the event in the item. Can you confirm that it does this? If it
does not behave this way, please report it as a bug via the Task Tracker:

  http://www.qtsoftware.com/developer/task-tracker

David
-- 
David Boddie
Senior Technical Writer
Nokia, Qt Software



More information about the Qt-interest-old mailing list