Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to hide toolTips when component is hidden?
igor_stravinsky last edited by igor_stravinsky
I've got a view structure that looks like this:
-->Button with tooltip
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?
igor_stravinsky last edited by
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.