Manager: Add a context menu when clicking on empty space in the machine list
Currently only new machine for now
This commit is contained in:
@@ -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));
|
contextMenu.exec(ui->listView->viewport()->mapToGlobal(pos));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user