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

    Hi,

    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


  • Qt Champions 2017

    Hi
    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.