diff options
Diffstat (limited to 'src/mainwindow/mainwindow.cpp')
-rw-r--r-- | src/mainwindow/mainwindow.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp index 07ac8f0..9a9b8e8 100644 --- a/src/mainwindow/mainwindow.cpp +++ b/src/mainwindow/mainwindow.cpp @@ -28,6 +28,7 @@ #include <QToolBar> #include <QUrl> #include <configuration/configuration.h> +#include <webprofile.h> #ifdef QT_DEBUG #include "session.h" @@ -267,6 +268,16 @@ SubWindow *MainWindow::currentSubWindow() const return qobject_cast<SubWindow *>(mdiArea->currentSubWindow()); } +SubWindow *MainWindow::createSubWindow(WebProfile *profile) +{ + auto *w = new SubWindow(m_config->section("window"), this); + w->setProfile(profile); + mdiArea->addSubWindow(w); + w->showMaximized(); + w->setFocus(); + return w; +} + SubWindow *MainWindow::createSubWindow(const QString &url) { auto *w = new SubWindow(m_config->section("window"), this); |