I rebuilt a periodic table using QML and stumbled upon the following problem. Due to size limitations I decided to reduce the amount of information that is shown to a minimum and instead implemented the option to hover over a certain element which causes a tooltip to show up, offering more information.
My problem is, that when you move the cursor to take a look at a different element, the tooltip will not stop showing immediately but slowly fade out instead. Rambling from side to side with your mouse will show this for example:
Is there a way to remove this fadeout and let the tooltips disappear immediately instead? Thanks in advance :)
CodePudding user response:
This is defined in the style you are using. Either you write your own style, a custom ToolTip
or overwrite manually every time. To fix it you need to overwrite the exit transition.
Button {
id: button
text: qsTr("Save")
ToolTip {
parent: button
visible: button.hovered
delay: 500
text: "This is a ToolTip"
exit: Transition {}
}
}