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
Forum Updated to NodeBB v4.3 + New Features

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 4 Watching
  • 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.
  • Z Offline
    Z Offline
    Zee_07
    wrote on 23 Apr 2018, 13:50 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
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 23 Apr 2018, 21:20 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
      • Z Offline
        Z Offline
        Zee_07
        wrote on 24 Apr 2018, 10:21 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
        • M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 24 Apr 2018, 15:04 last edited by
          #4

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

          1 Reply Last reply
          0

          1/4

          23 Apr 2018, 13:50

          • Login

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