diff options
Diffstat (limited to 'src/webengine/webview.cpp')
-rw-r--r-- | src/webengine/webview.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp index 7ca3280..520ce50 100644 --- a/src/webengine/webview.cpp +++ b/src/webengine/webview.cpp @@ -13,6 +13,7 @@ #include <QDialog> #include <QStatusBar> #include <QVBoxLayout> +#include "mainwindow/widgets/tabbar.h" WebView::WebView(MainWindow *parentMainWindow, QWidget *parent) : QWebEngineView(parent) @@ -127,3 +128,13 @@ void WebView::triggerViewAction(WebView::ViewAction action) break; } } + +WebView *createWebView(const QUrl &url, WebEngineProfile *profile, MainWindow *parent) +{ + auto *view = new WebView(parent); + auto *page = new WebPage(profile); + view->setPage(page); + page->load(url); + + return view; +} |