Hey, not sure if you found the solution yet. But you can try this:
QGraphicsPixmapItem *pixmapItem = new QGraphicsPixmapItem;
pixmapItem->setPixmap(QPixmap(":/images/pixmap.png"));
_scene->addItem(pixmapItem);
pixmapItem->setRotation(pixmapItem->rotation() + 45.0);
QGraphicsRectItem *boundingRect = new QGraphicsRectItem(pixmapItem->sceneBoundingRect());
QPen outlinePen;
outlinePen.setWidth(2);
outlinePen.setColor(Qt::red);
boundingRect->setPen(outlinePen);
_scene->addItem(boundingRect);
I believe what you want is the sceneBoundingRect() and not the boundingRect().