summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAdam Kallai <kadam@inf.u-szeged.hu>2016-02-10 10:25:07 +0100
committerAdam Kallai <kadam@inf.u-szeged.hu>2016-02-10 13:24:29 +0000
commit8411304d3393cb5ce5ec972ffe9fe3fab00fb981 (patch)
tree2808ce0f63f1c517eeb082f129e516df3f3c9e94 /examples
parent8c9b01adf2fed485aae36356c6d622f300bdc7e8 (diff)
Added background tab support to Widgets
- Added middle click navigation support to DemoBrowser. - Extended WebAction with new case (open a new tab in background). - Updated WebEngineWidgets documentation. Change-Id: I4ff91806c274a74f4d94b3f5d43fdd99ab900d46 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/webenginewidgets/demobrowser/webview.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/webenginewidgets/demobrowser/webview.cpp b/examples/webenginewidgets/demobrowser/webview.cpp
index ed7f52ad..35f765b5 100644
--- a/examples/webenginewidgets/demobrowser/webview.cpp
+++ b/examples/webenginewidgets/demobrowser/webview.cpp
@@ -185,6 +185,8 @@ QWebEnginePage *WebPage::createWindow(QWebEnginePage::WebWindowType type)
{
if (type == QWebEnginePage::WebBrowserTab) {
return mainWindow()->tabWidget()->newTab()->page();
+ } else if (type == QWebEnginePage::WebBrowserBackgroundTab) {
+ return mainWindow()->tabWidget()->newTab(false)->page();
} else if (type == QWebEnginePage::WebBrowserWindow) {
BrowserApplication::instance()->newMainWindow();
BrowserMainWindow *mainWindow = BrowserApplication::instance()->mainWindow();
@@ -387,6 +389,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
++it;
menu->insertAction(*it, page()->action(QWebEnginePage::OpenLinkInNewWindow));
menu->insertAction(*it, page()->action(QWebEnginePage::OpenLinkInNewTab));
+ menu->insertAction(*it, page()->action(QWebEnginePage::OpenLinkInNewBackgroundTab));
}
menu->popup(event->globalPos());