Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.12
-
None
-
Issue occurs on Windows 10 and possibly on Mac and Linux as well.
Description
We are using PyQt 5.12.1 but I believe this is underlying Qt issue.
There are certain cases in our software where we close and immediately open a new dialog programmatically. We are using deleteLater to schedule the deletion of the dialog on receipt of the destroyed signal. However, the deleteLater seems to be deleting the reference to the newly opened dialog and not the previously closed dialog. So, when the new dialog is referenced it shows this error:
Error: wrapped C/C++ object of type <dialogName> has been deleted on line 386 of file <dialogName>.py
This doesn't happen when closing and reopening the dialog manually as it gives time for the deleteLater to run before the same dialog is re-opened.
Is there a workaround for this?
We are using the deleteLaters for dialogs as we have seen crashes when closing dialogs on Linux and Mac which the deleteLaters seem to solve.