summaryrefslogtreecommitdiff
path: root/src/mainwindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cc')
-rw-r--r--src/mainwindow.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index e7d099d..b9cf800 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -49,6 +49,8 @@ MainWindow::MainWindow(Settings& settings)
tab_widget = new QTabWidget();
tab_widget->setTabsClosable(true);
tab_widget->setMovable(true);
+ connect(tab_widget, SIGNAL(tabCloseRequested(int)),
+ this, SLOT(closeTab(int)));
setCentralWidget(tab_widget);
@@ -277,3 +279,8 @@ void MainWindow::projectChanged()
project_dirty = true;
updateWindowTitle();
}
+
+void MainWindow::closeTab(int tab)
+{
+ tab_widget->removeTab(tab);
+}