--- a/src/mainwindow.cpp Sun Apr 09 12:23:32 2023 +0300 +++ b/src/mainwindow.cpp Sun Apr 09 13:28:36 2023 +0300 @@ -87,3 +87,16 @@ dialog.setWindowTitle(QObject::tr("About %1").arg(CMAKE_PROJECT_NAME)); dialog.exec(); } + +void MainWindow::rebuildRecentFilesMenu(const QStringList& strings) +{ + this->menuRecentFiles->clear(); + for (const QString& path : strings) + { + QAction* action = new QAction{path, this}; + this->menuRecentFiles->addAction(action); + connect(action, &QAction::triggered, [&, path]{ + Q_EMIT this->recentFileSelected(path); + }); + } +}