Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to show tooltip over custom QQuickPaintedItem?
Qt 6.12 LTS is out! See what's new in the release blog

How to show tooltip over custom QQuickPaintedItem?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 361 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.
  • K Offline
    K Offline
    kitfox
    wrote on last edited by
    #1

    I've created a custom component that extends QQuickPaintedItem. Now I'm trying to figure out how to add a tooltip to it for when the user hovers the mouse above it. I've added at ToolTip as a child, but it is not displaying when the program is run. What's the right way to do this?

                    PianorollKeyboard {
                        id: keyboardComponent
                        width: 120
                        Layout.fillHeight: true
    
                        centerY: scrollViewY.center
                        noteHeight: vertZoom.value
                        
                        ToolTip {
                            visible: hovered
                            text: "Foo"
                        }
    
                        Component.onCompleted: {
                            load()
                        }
                    }
    
    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
    • Unsolved