Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
5.12.8, 5.14.2, 5.15.0
-
None
-
Ubuntu 18.04, Windows 10/Surface 4 Pro
Description
When popup destroyed by clearing StackView or exiting the application 'closed' signal is emitted too late:
import QtQuick 2.12 import QtQuick.Controls 2.12 ApplicationWindow { visible: true width: 640 height: 480 Component { id: popupComponent Popup { Button { text: 'pop' onClicked: stack.clear() } } } StackView { id: stack initialItem: Component { Item { Button { text: 'open' onClicked: { const popup = popupComponent.createObject(this) popup.Component.destruction.connect(() => { console.log('destruction') }) popup.closed.connect(() => { console.log('closed') popup.destroy() }) popup.open() } } } } } }
Output:
qml: destruction
qml: closed
qrc:/main.qml:37: TypeError: Property 'destroy' of object TypeError: Type error is not a function