Reputation: 989
Alright there's a custom QDialog (class derived from QDialog) , stuff populated from QML, it works it opens just fine it behaves as desired, but then when we want to kill it using
mDialog-> close() or mDialog->hide()
all the animations within the dialog halt, everything within it freezes but.. it doesn't close.
if you wonder how we initiate the destruction process, there's a button within the QML which sends a signal to the C++ back-end, the back-end holds pointer to the dialog and tries to close. The dialog is opened with showFullScreen so ther's nothing blocking (exec would block) Ideas?
Upvotes: 0
Views: 147
Reputation: 989
After many human-work-hours, we stumbled upon a FIX.
Lo and behold. So for this to work we had to
dialog->setAttribute(Qt::WA_DeleteOnClose,true);
before trying to close().
Now there's nothing in documentation suggesting that something like this would be required? Supposedly a BUG, right?
conversely for instance a sequence of:
dialog->close() /// hide()/ reject()
delete dialog;
would result in an exception with QT saying something about its processing queue being pre-occupied and us trying to kill it.
Upvotes: 0