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. when i select Child Item in QGraphicsScene , parent item returns its co ordinate
Forum Updated to NodeBB v4.3 + New Features

when i select Child Item in QGraphicsScene , parent item returns its co ordinate

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 633 Views 2 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.
  • J Offline
    J Offline
    Jaisan
    wrote on last edited by
    #1

    I have multiple GrahicItem drawn in QGraphicsScene, two parent rectangle and thousands of small child rectangle set as child to the parent.
    The problem I am facing is when I select child rectangle, it always returns parent co ordinate and parent Item pointer.
    Can some one help why this issue?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Asperamanca
      wrote on last edited by
      #2

      Can you post the code where you receive the coordinates, so we can better understand the problem?

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jaisan
        wrote on last edited by
        #3

        event is QMouseEvent
        QGraphicsItem *obj = this->itemAt(event->pos());

        when I select child item , it always returns the parent object .

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

          Hi,

          What exactly do you want to do when you select your items ?

          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

          • Login

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