timeout popup after mouse exits

This commit is contained in:
Benjamin Palko 2025-08-02 21:03:41 -04:00
parent 49ec4d8502
commit 87e9941e0a

View file

@ -32,6 +32,25 @@ PopupWindow {
} }
} }
Timer {
id: timer
interval: 750
onTriggered: {
if (!root.visible) {
return;
}
root.toggle();
}
}
WrapperMouseArea {
hoverEnabled: true
onExited: {
timer.start();
}
onEntered: {
timer.stop();
}
WrapperRectangle { WrapperRectangle {
id: background id: background
@ -79,4 +98,5 @@ PopupWindow {
sourceComponent: root.content sourceComponent: root.content
} }
} }
}
} }