How to get rect of inner item of QGraphicsProxyWidget

  • I have global mouse position which is coming from QMainWindow. Inside mainwindow QgraphicsView is present which contains QGraphicsProxyWidget and again this QGraphicsProxyWidget has too many other QGraphicsItems in it. How can I get the rect of inner QGraphicsItem which lies inside QGraphicsProxyWidget when mouse cursor is on it? (consider view supports scaling).

    Any suggestions or ideas?

  • Lifetime Qt Champion


    From the way you write it, you seem to have a QGraphicsView inside a QGraphicsProxyWidget, is that the case ?

  • No, QGraphicsProxyWidget is inside QGraphicsView.
    0_1524565354702_QGraphicsProxyWidget  item rect.png

  • Lifetime Qt Champion

    I was wondering if you could use
    QRectF QGraphicsProxyWidget::subWidgetRect(const QWidget * widget) const

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.