diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-10-10 19:25:44 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-10-10 19:25:44 +0200 |
commit | 442ba9f09a8ee18609361f3971b5da7f40eb5c35 (patch) | |
tree | fd612714e7df77ff3523a6773b6e9c3e60084809 /src/mainwindow.cpp | |
parent | Cleaned up WebViewTabBar (diff) | |
download | smolbote-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.cpp | 11 |
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) |