Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.13.2, 5.14.1
-
None
-
Windows
Description
I have a QT project. In C + +, I derive a QObject class, construct an object and register it correctly in the QML environment. QML operates the properties and methods of this QObject many times, but there is a certain chance that it will be inexplicable to deconstruct this object. I debugged the object's destructor function, and found an event (and possibly a signal) to deconstruct this object. I promise to replace it The code is completely correct, and there is no destructor call of delete and destroy in QT and QML. A solution is found inadvertently, that is, assign a value to the parent of that object (as long as it is not nullptr), and the program is completely OK.
Both of my projects have encountered this problem, which I think is not a coincidence.