diff --git a/src/qt/qt_vmmanager_main.cpp b/src/qt/qt_vmmanager_main.cpp index 3dcb4d511..f11fdc5a6 100644 --- a/src/qt/qt_vmmanager_main.cpp +++ b/src/qt/qt_vmmanager_main.cpp @@ -138,6 +138,18 @@ VMManagerMain::VMManagerMain(QWidget *parent) : } }); + QAction openScreenshotsFolderAction(tr("Open screenshots &folder...")); + contextMenu.addAction(&openScreenshotsFolderAction); + connect(&openScreenshotsFolderAction, &QAction::triggered, [indexAt] { + if (const auto screenshotsDir = indexAt.data(VMManagerModel::Roles::ConfigDir).toString() + QString("/screenshots/"); !screenshotsDir.isEmpty()) { + QDir dir(screenshotsDir); + if (!dir.exists()) + dir.mkpath("."); + + QDesktopServices::openUrl(QUrl(QString("file:///") + dir.canonicalPath())); + } + }); + QAction setSystemIcon(tr("Set &icon...")); contextMenu.addAction(&setSystemIcon); connect(&setSystemIcon, &QAction::triggered, [this] {