+ case QWebEnginePage::WebBrowserWindow:
+ {
+ // Create a new browser window.
+ BrowserWindow *newBrowserWindowPointer = new BrowserWindow();
+
+ // Show the new browser window.
+ newBrowserWindowPointer->show();
+
+ // The new privacy WebEngine view pointer is returned so it can be populated with the link from the context menu.
+ return newBrowserWindowPointer->tabWidgetPointer->loadBlankInitialWebsite();
+ }
+
+ case QWebEnginePage::WebBrowserBackgroundTab:
+ {
+ // Create the new tab and return the privacy WebEngine view pointer. `false` does not clear the URL line edit. `true` creates a background tab.
+ // The new privacy WebEngine view pointer is returned so it can be populated with the link from the context menu.
+ return browserWindowPointer->tabWidgetPointer->addTab(false, true);
+ }
+
+ default:
+ {
+ // Return an null pointer for opening a background tab and opening a web dialog.