From 605a6b32d60a3ff14e5665173f920303ad7e7b96 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Wed, 13 Aug 2025 18:50:10 +0500 Subject: [PATCH] Manager: add a way to open screenshot folder --- src/qt/qt_vmmanager_main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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] {