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. Mouse press event for graphicsellipseitem
Forum Updated to NodeBB v4.3 + New Features

Mouse press event for graphicsellipseitem

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 267 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
    swat
    wrote on last edited by
    #1

    I have developed widget application with graphicsview and for graphicsview created graphicsscene and when we command send from application and receive data and need to extract range, bearing from data and converting range and bearing into X And y coordinates and plotting into graphicsview using graphicsellipseitem.
    Now I am facing an issue that when I click on target I. E graphicsellipseitem I want to get info about clicked item like range, bearing.
    Can you please help on this how to write mousepress event for graphicsellipseitem item and how to get info about particular target.

    JonBJ Pl45m4P 2 Replies Last reply
    0
    • S swat

      I have developed widget application with graphicsview and for graphicsview created graphicsscene and when we command send from application and receive data and need to extract range, bearing from data and converting range and bearing into X And y coordinates and plotting into graphicsview using graphicsellipseitem.
      Now I am facing an issue that when I click on target I. E graphicsellipseitem I want to get info about clicked item like range, bearing.
      Can you please help on this how to write mousepress event for graphicsellipseitem item and how to get info about particular target.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @swat
      As per https://doc.qt.io/qt-5/qgraphicsellipseitem-members.html, QGraphicsEllipseItem inherits https://doc.qt.io/qt-5/qgraphicsitem.html#mousePressEvent.

      1 Reply Last reply
      0
      • S swat

        I have developed widget application with graphicsview and for graphicsview created graphicsscene and when we command send from application and receive data and need to extract range, bearing from data and converting range and bearing into X And y coordinates and plotting into graphicsview using graphicsellipseitem.
        Now I am facing an issue that when I click on target I. E graphicsellipseitem I want to get info about clicked item like range, bearing.
        Can you please help on this how to write mousepress event for graphicsellipseitem item and how to get info about particular target.

        Pl45m4P Offline
        Pl45m4P Offline
        Pl45m4
        wrote on last edited by Pl45m4
        #3

        @swat said in Mouse press event for graphicsellipseitem:

        how to get info about particular target.

        After you implemented the mousePressEvent you have to decide if you check, if the QGraphicsEllipseItem is selected (set ItemIsSelectable flag first) or if you subclass it and send a signal on mousePressEvent (or output the item properties directly inside the event function)


        If debugging is the process of removing software bugs, then programming must be the process of putting them in.

        ~E. W. Dijkstra

        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