add a hook so that clients can gain access to the new component, window,

and request
This commit is contained in:
howard-stearns 2016-08-29 14:44:48 -07:00
parent 6272db42da
commit 11f00ed46c

View file

@ -61,10 +61,12 @@ WebEngineView {
}
}
property var newWindowHook: function (component, newWindow, request) { }; // override if you need to
onNewViewRequested:{
var component = Qt.createComponent("../Browser.qml");
var newWindow = component.createObject(desktop);
request.openIn(newWindow.webView)
var component = Qt.createComponent("../Browser.qml");
var newWindow = component.createObject(desktop);
request.openIn(newWindow.webView)
newWindowHook(component, newWindow, request);
}
// This breaks the webchannel used for passing messages. Fixed in Qt 5.6