diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp index 997f4c2f76f..42889793958 100644 --- a/src/libs/utils/pathchooser.cpp +++ b/src/libs/utils/pathchooser.cpp @@ -250,6 +250,10 @@ PathChooser::PathChooser(QWidget *parent) : PathChooser::~PathChooser() { + // Since it is our focusProxy it can receive focus-out and emit the signal + // even when the possible ancestor-receiver is in mid of its destruction. + disconnect(d->m_lineEdit, &QLineEdit::editingFinished, this, &PathChooser::editingFinished); + delete d; }