Added instance context menu and status tips.
This commit is contained in:
parent
90764f97d9
commit
de2632af0d
3 changed files with 91 additions and 4 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue