summaryrefslogtreecommitdiffstats
path: root/gui/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/mainwindow.cpp')
-rw-r--r--gui/mainwindow.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index e257f5ae..dc8f77fe 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -16,6 +16,8 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"
+#include <QMenu>
+
#include <QDesktopServices>
#include <QUrl>
@@ -104,3 +106,13 @@ void MainWindow::closeEvent(QCloseEvent *event)
settings->getConfig().setValue("MainWindowState", saveState());
QMainWindow::closeEvent(event);
}
+
+void MainWindow::on_instanceView_customContextMenuRequested(const QPoint &pos)
+{
+ QMenu *instContextMenu = new QMenu("Instance", this);
+
+ // Add the actions from the toolbar to the context menu.
+ instContextMenu->addActions(ui->instanceToolBar->actions());
+
+ instContextMenu->exec(ui->instanceView->mapToGlobal(pos));
+}