corrado1972
4th January 2012, 09:46
I want to exclude a single item from the computation of itemsboundingrect method: is this possibile? Maybe setting some flags?
This is my motivation: I have a qgraphicsscene with few items, the scene is zoomable, and the user is able to call fitInView with a button.
When I call fitInView, I'm using qgraphicsscene::itemsboundingrect instead of scene::scenerect(): I have no performance issues (there are too few items on the scene).
The item I want to exlude from computation is a ruler that is longer than the other items boundingrect, and it's causing a boundingrect bigger than the necessary.
thank you
This is my motivation: I have a qgraphicsscene with few items, the scene is zoomable, and the user is able to call fitInView with a button.
When I call fitInView, I'm using qgraphicsscene::itemsboundingrect instead of scene::scenerect(): I have no performance issues (there are too few items on the scene).
The item I want to exlude from computation is a ruler that is longer than the other items boundingrect, and it's causing a boundingrect bigger than the necessary.
thank you