The documentation for QDialog::exec (http://doc.qt.io/qt-5/qdialog.html#exec) says: > Note: Avoid using this function; instead, use open(). Unlike exec(), open() > is asynchronous, and does not spin an additional event loop. This prevents a > series of dangerous bugs from happening (e.g. deleting the dialog's parent > while the dialog is open via exec()). There's some more explanation at https://blog.qt.io/blog/2010/02/23/unpredictable-exec/ . Also, https://blogs.kde.org/2009/03/26/how-crash-almost-every-qtkde-application-and-how-fix-it-0 says that these methods should be avoided: > QCoreApplication::processEvents > QDialog::exec > QDrag::exec > QEventLoop::processEvents > QProcess::waitForStarted > QProcess::waitForFinished It would be handy to have clazy emit warnings for calls to these methods.