Hey everybody!

I've got a GraphicsScene with items it it. By tapping a button all of the items should move to no top-left corner by resizing. I've got a QList with the items in it. I'm using the following code to get all the items in the list in place. By using the while-loop I can directly remove the items, but the problem appeared in a for-loop as well:

Qt Code:
  1. while(selectedItemsToStack->count() > 0)
  2. {
  3. item = selectedItemsToStack->takeAt(0);
  4. item->setPos(0,0);
  5. item->setScale(0.5);
  6. }
To copy to clipboard, switch view to plain text mode 

Scaling works file for all the items in the list, which shows, that theres no problem with the list or the loop, but setting the position only works for the first item, the rest of the items stays in place and seem to simply ignore the command. No matter if I'm using fixed values or variables, positive oder negative the first item does exactly what I want, the others don't.

I read, that setPos sets the Position in parent-coordinates, if parent is set. As far as I can see the items gets simply added to the scene on the rather top of the file:

Qt Code:
  1. scene->addItem(newItem);
To copy to clipboard, switch view to plain text mode 

The item-class I'm using is inherits QGraphicsPixmapItem and is itself parent of several other items, but theres no parent set for the item itself. the Doc says, that setPos affects the scenePos in this case, but theres nothing happening at all.

I hope the information I gave are sufficient to give an advice. Any advice is welcome since I'm sitting on this for 3 afternoons now without any result.

Best regards
MisterIKS