diff --git a/src/widgets/dialogs/exportdialog.cpp b/src/widgets/dialogs/exportdialog.cpp index 6f2bc098..fa4e78c2 100644 --- a/src/widgets/dialogs/exportdialog.cpp +++ b/src/widgets/dialogs/exportdialog.cpp @@ -53,6 +53,8 @@ ExportDialog::ExportDialog(Notebook *p_notebook, restoreFields(m_option); + setWindowFlags(windowFlags() | Qt::WindowMinimizeButtonHint); + connect(this, &QDialog::finished, this, [this]() { saveFields(m_option); diff --git a/src/widgets/mainwindow.cpp b/src/widgets/mainwindow.cpp index a8036db9..9e438f22 100644 --- a/src/widgets/mainwindow.cpp +++ b/src/widgets/mainwindow.cpp @@ -857,12 +857,17 @@ void MainWindow::exportNotes() if (noteNode && !noteNode->hasContent()) { noteNode = nullptr; } - ExportDialog dialog(currentNotebook, - folderNode, - noteNode, - viewWindow ? viewWindow->getBuffer() : nullptr, - this); - dialog.exec(); + auto dialog = new ExportDialog(currentNotebook, + folderNode, + noteNode, + viewWindow ? viewWindow->getBuffer() : nullptr, + nullptr); + connect(dialog, &QDialog::finished, + this, [this, dialog]() { + dialog->deleteLater(); + }); + // Let it be able to run at background. + dialog->show(); } void MainWindow::showTips(const QString &p_message, int p_timeoutMilliseconds)