aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-10-10 19:25:44 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2017-10-10 19:25:44 +0200
commit442ba9f09a8ee18609361f3971b5da7f40eb5c35 (patch)
treefd612714e7df77ff3523a6773b6e9c3e60084809 /src/mainwindow.cpp
parentCleaned up WebViewTabBar (diff)
downloadsmolbote-442ba9f09a8ee18609361f3971b5da7f40eb5c35.tar.xz
Split off DownloadsWidget into library
Fixed bug with BookmarksWidget crashing the program on exit
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 4b43f49..1036cbb 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -34,6 +34,8 @@
#include <QWebEngineHistory>
+#include <QDockWidget>
+
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow),
@@ -140,8 +142,13 @@ MainWindow::~MainWindow()
delete ui;
}
-void MainWindow::addTabbedDock(Qt::DockWidgetArea area, QDockWidget *widget)
+void MainWindow::addTabbedDock(Qt::DockWidgetArea area, QWidget *widget)
{
+ QDockWidget *dock = new QDockWidget(widget->windowTitle(), this);
+ dock->setWidget(widget);
+ addDockWidget(area, dock);
+
+ /*
QList<QDockWidget*> allDockWidgets = findChildren<QDockWidget*>();
QVector<QDockWidget*> areaDockWidgets;
for(QDockWidget *w : allDockWidgets) {
@@ -155,7 +162,7 @@ void MainWindow::addTabbedDock(Qt::DockWidgetArea area, QDockWidget *widget)
addDockWidget(area, widget);
} else {
tabifyDockWidget(areaDockWidgets.last(), widget);
- }
+ }*/
}
void MainWindow::newTab(const QUrl &url)