Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to get rect of inner item of QGraphicsProxyWidget
QtWS25 Last Chance

How to get rect of inner item of QGraphicsProxyWidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
graphics viewgraphics scenegraphicsitem
4 Posts 3 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Zee_07Z Offline
    Zee_07Z Offline
    Zee_07
    wrote on last edited by Zee_07
    #1

    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?

    Thanks and Kind Regards,
    Zee_07

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Zee_07Z Offline
        Zee_07Z Offline
        Zee_07
        wrote on last edited by Zee_07
        #3

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

        Thanks and Kind Regards,
        Zee_07

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved