PDA

View Full Version : QGraphicsView and showing entire item in it



T4ng10r
24th March 2010, 11:24
In subbclassed QGraphicsScene I created table from 100 small rectangles in QGraphicsGridLayout inside main, parent item. View - which shows my my scene - is placed in QMainWindow.
I want that table in view will expand to fill as much of view space as possible. Because size of view will be changing I can't use hardcoded values. I think that i could use zooming in view to automatically, on start or load of data inside scene, scale everything.
Could you point - how to achieve this?

aamer4yu
24th March 2010, 11:44
QGraphicsView::fitInView