Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to hide toolTips when component is hidden?
Forum Updated to NodeBB v4.3 + New Features

How to hide toolTips when component is hidden?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 505 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.
  • I Offline
    I Offline
    igor_stravinsky
    wrote on last edited by igor_stravinsky
    #1

    I've got a view structure that looks like this:

    Rectangle A
    ->Rectangle B
    -->Button with tooltip
    Text

    Either Rectangle A is showing, or Text is showing, but not both. I flip back and forth by changing the opacities.

    The problem is that the tooltip for the Button shows up even when Rectangle A has an opacity of 0. I can write code to avoid showing the tooltip in the Rectangle B qml code, but I can't access the opacity of Rectangle A from the Button's code (the two rectangles are in different qml files), and opacity isn't inherited (setting the opacity of Rectangle A has no effect on the opacity of Rectangle B or Button)

    What's the best way to avoid showing the Button's tooltip?

    1 Reply Last reply
    0
    • I Offline
      I Offline
      igor_stravinsky
      wrote on last edited by
      #2

      I found the solution.

      I needed to change the visibility of Rectangle A to be opacity > 0, and then I could test visibility in subviews.

      1 Reply Last reply
      1

      • Login

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