Hi,
How do I know when item is deleted (destructor called) in QML/JavaScript?

I tried:
Connections {
    target: someItem
    onDestroyed: console.log("someItem deleted")
}

è results: QML Connections: Cannot assign to non-existing property "onDestroyed"

And in JavaScript:
someItem.destroyed.connect(loggingItem, someItemDeletedFunction)

è results: TypeError: Cannot call method ´connect´of undefined.

Reading the documentation and the code (5.0), the QObject has signal 
destroyed(). The someItem is defined in cpp and it's registed to QML (otherwise 
it works fine). Replacing the code snippets with any other signal works fine.

Any ideas?

Thanks,
-Pekka

P.s I do not control the construction of the item so I cannot override the 
Component.onCompleted: in the element definition.
_______________________________________________
Qt-qml mailing list
Qt-qml@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to