Yes, that's more or less correct.
No, this is wrong. You need to use QGraphicsItem::setPos().I can change the position of the item with the use of GraphicsPixmapItem->setOffset(...).
You have to set positions of each of the pixmaps in such way that each consecutive pixmap is moved to the right by the sum of widths of all previous pixmaps. When you don't have enough space left, reset the x coordinate and instead increase the y coordinate by the height of the previous row.What I was trying all along to find out is the following: in order to have several pixmap items in the scene, and order them into a grid, how do I define the position of the items?
Yes, it does.I can define the scene rect. When I show the QGraphicsView, doesn't it show this rect ?
You always want to show the whole width of the scene. If you don't change the scene but reduce the size of the view that displays it, you'll get scrollbars which is probably not what you want.What do you mean, that the scene size must reflect the view's size.
Yes, but you might want to resize the view, right? The scene won't accomodate - it doesn't work both ways.The documentation says, that if you don't mess with QGraphicsView's sceneRect, it takes by default the rect of the QGraphicsScene, which means the one rect relfects to the other. Or not ?






Reply With Quote
Bookmarks