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

geometry of QGraphicsRectItem

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 375 Views 1 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.
  • S Offline
    S Offline
    sayan275
    wrote on last edited by sayan275
    #1

    I have a qgraphicsRectItem drawn on a qgraphicsScene. With mouse events, it's being moved over the scene, resized and repositioned. How can I get the geometry of that qgraphicsRectItem boundingRect, pos wrt scene on mouseReleaseEvent? There's a image on scene, and a boundingrect of qgraphicsRectItem is drawn on the scene, then i need to get qrect for cropping that portion of image within the bounding rect.

    1 Reply Last reply
    0
    • FlotisableF Offline
      FlotisableF Offline
      Flotisable
      wrote on last edited by
      #2

      You can use sceneBoundingRect() and scenePos() of the QGraphicsRectItem get the boundingRect and pos in the scene coordinate

      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