@raven-worx
I tried the following but didn't work out..
QGraphicsPixmapItem* item = new QGraphicsPixmapItem(QPixmap::fromImage(qImage, Qt::AutoColor)); m_ViewerScene->addItem(item); QGraphicsRectItem* rect = new QGraphicsRectItem(m_BoundingBox); m_ViewerScene->addItem(rect); rect->setParentItem(item); m_ViewerScene->update(); //add the resized QGraphicsPixmapItem to the pixmap item->setPixmap( item->pixmap().scaled(QSize(128, 32),Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); qInfo()<<"Rect resize props:::"<<item->childItems()[0]->boundingRect(); m_BoundingBox = item->childItems()[0]->boundingRect();later I'm drawing box, on the image in an other viewer, with m_BoundingBox.
0_1527498444379_Untitled.png
The grey area within the blue rectangle will be resized to 128 * 32, and then the red rectangle would be added on the resized image. How to get the co-ordinates of red rect on the resized image?