Replies: 3 comments 2 replies
-
Tooltip is one of the things that is not yet implemented. Ideally, we'd have something like a
But since we don't have that, the PopupWindow is a second good choice. Unfortunately, the PopupWindow is a bit basic and it steals the mouse input in the whole window, which is also not what we want. So we can come up with this hack, right now. It's a bit hackish but can be polished somehow. Long term we would like to have a proper solution within Slint of course. |
Beta Was this translation helpful? Give feedback.
-
Still no supported builtin tooltip in Slint. component ToolTipArea {
preferred-height: 100%;
preferred-width: 100%;
in property <string> text;
ta := TouchArea {}
Rectangle {
states [
visible when ta.has-hover: {
opacity: 0.8;
in {
animate opacity { duration: 175ms; delay: 700ms; }
}
}
]
x: ta.mouse-x + 1rem;
y: ta.mouse-y + 1rem;
background: lightyellow;
opacity: 0;
width: tt_l.preferred-width;
height: tt_l.preferred-height;
tt_l := HorizontalLayout {
padding: 3px;
Text { text <=> root.text; }
}
}
} |
Beta Was this translation helpful? Give feedback.
-
There is now an issue with another example: #6446 (comment) |
Beta Was this translation helpful? Give feedback.
-
I guess a popupwindow might be a proper way, but how to bind the "show()" show to "has-hover" property of a touch area?
Beta Was this translation helpful? Give feedback.
All reactions