src/mainwindow.cpp

changeset 361
c5e8b68e34f8
parent 355
e81f4ad53efd
child 362
e1d646a4cbd8
equal deleted inserted replaced
360:41b38b9e05a2 361:c5e8b68e34f8
85 ); 85 );
86 } 86 }
87 dialog.setWindowTitle(QObject::tr("About %1").arg(CMAKE_PROJECT_NAME)); 87 dialog.setWindowTitle(QObject::tr("About %1").arg(CMAKE_PROJECT_NAME));
88 dialog.exec(); 88 dialog.exec();
89 } 89 }
90
91 void MainWindow::rebuildRecentFilesMenu(const QStringList& strings)
92 {
93 this->menuRecentFiles->clear();
94 for (const QString& path : strings)
95 {
96 QAction* action = new QAction{path, this};
97 this->menuRecentFiles->addAction(action);
98 connect(action, &QAction::triggered, [&, path]{
99 Q_EMIT this->recentFileSelected(path);
100 });
101 }
102 }

mercurial