Hi all.

I'm having an issue with my QGraphicsItems. I want to put multiple QGraphicsItems next to eachother. What would be the best way to do that?

I used this code, which only works when the items are not transformed. But what should I use when the items are infact transformed? Because boundingRect() doesn't take the transformation into account.

Qt Code:
  1. for (int i = 0; i < itemList.size(); i++) {
  2. itemList[i]->setTransformationMode(Qt::SmoothTransformation);
  3. if (i > 0) itemList[i]->setPos(itemList[i-1]->x()+itemList[i-1]->boundingRect().width(), 0);
  4. itemList[i]->setPos(itemList[i]->x(), (200-itemList[i]->boundingRect().height())/2.0);
  5. }
To copy to clipboard, switch view to plain text mode 

I hope someone here can help me.... Thanks!