Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
-
0e516bc9638d7b5ade38d356a304473af6adbc48 (qt/qtquickcontrols2/dev)
Description
Quoting this comment:
Another thing that I didn't know is that the timeout starts as soon as the popup is visible, not when it has been fully opened. That means that if you have an enter transition that is 1000 ms long, with a 500 ms timeout, the timeout will finish before the enter transition. A tooltip's timeout should be much longer than the enter transition, so it probably won't be an issue in practice, but I would have thought it would make more sense to start the timeout when "opened" becomes true.
import QtQuick 2.15 import QtQuick.Controls 2.15 ApplicationWindow { width: 400 height: 400 visible: true Button { id: button text: "Button" ToolTip { parent: button visible: button.pressed text: "Test" timeout: 500 onOpened: print("opened") onAboutToHide: print("aboutToHide") onClosed: print("closed") enter: Transition { NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; easing.type: Easing.OutQuad; duration: 1000 } } } } }
Before starting work on this, we should probably check how widgets behaves in this regard.
Attachments
Issue Links
- resulted from
-
QTBUG-81935 Tooltip not closing properly with custom animation if open() is called during exit transition.
- Closed