I'm using a ToolTip with a TextField. This works properly.
RowLayout {
property string toolTipText
TextField {
hoverEnabled: true
ToolTip.visible: tooltipText ? hovered : false
ToolTip.text: tooltipText
}
}
But with a Label it wont work properly.
hoverEnabled
is not available in the Label Component. So i've tried it with a MouseArea
RowLayout {
property string toolTipText
Label {
MouseArea {
anchors.fill: parent
hoverEnabled: true
ToolTip.visible: tooltipText ? hovered : false
ToolTip.text: tooltipText
}
}
}
The ToolTip will be shown, but not when mouseover the Label. It actually shows when entering the Window.
Is there any solution for this?
MouseArea does not have the ToolTip but the Label, so that you must move it and activate it using the containsMouse property of MouseArea: