From 6ec10bfa556171db87812469fced63e1681825ac Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Sun, 17 Aug 2025 08:38:33 +0500 Subject: [PATCH] Manager: Add a context menu when clicking on empty space in the machine list Currently only new machine for now --- src/qt/qt_vmmanager_main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/qt/qt_vmmanager_main.cpp b/src/qt/qt_vmmanager_main.cpp index d2ce2f025..e3ab6a2c2 100644 --- a/src/qt/qt_vmmanager_main.cpp +++ b/src/qt/qt_vmmanager_main.cpp @@ -331,6 +331,14 @@ illegal_chars: } }); + contextMenu.exec(ui->listView->viewport()->mapToGlobal(pos)); + } else { + QMenu contextMenu(tr("Context Menu"), ui->listView); + + QAction newMachineAction(tr("New machine...")); + contextMenu.addAction(&newMachineAction); + connect(&newMachineAction, &QAction::triggered, this, &VMManagerMain::newMachineWizard); + contextMenu.exec(ui->listView->viewport()->mapToGlobal(pos)); } });