PDA

View Full Version : No QProxyScene ???



travlr
15th April 2009, 20:58
Hi all,

In the GraphicsView framework, I don't see the analogous to a QProxyModel of the ModelView framework.
This can't be true.. can it?
What am I missing here?
Do you have efficient hints on how I should implement filtering a scene's items from view to view in my app?

Thanks,
~travlr

wysota
15th April 2009, 23:55
That's simple. Reimplement QGraphicsView::drawItems(), filter the input arguments and call the base class implementation with the new data. Just remember this only influences drawing. If you want to do the same for interaction, you need to reimplement the event handlers for the view and make sure events "omit" the items that are filtered out.