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. Show ToolTip on Mouse Hover over QGraphics Item

Show ToolTip on Mouse Hover over QGraphics Item

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.5k 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.
  • N Offline
    N Offline
    nike.niec
    wrote on last edited by
    #1

    I drew 256 "QGraphicsRectItem" on a QGraphicsView.
    Each Item is representing a Storage LUN.
    Now i want to show tooltip like LUN0,LUN1 on each item on mousehover event.

    I want to know how to acheive this.

    1 Reply Last reply
    0
    • N Offline
      N Offline
      nike.niec
      wrote on last edited by
      #2

      I am able to show tool tip like LUN0,LUN1 by using setToolTip method of
      QGraphicsViewRectItem

      But still i want to know how to capture mouse hover events for a particular QGraphicsViewRectItem and do some actions regarding that.

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

        Hi,

        You can e.g. create your own QGraphicsViewRectItem subclass and reimplement the mouseXXXEvent methods.

        Hope it helps

        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