mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 14:47:19 +02:00
add a hook so that clients can gain access to the new component, window,
and request
This commit is contained in:
parent
6272db42da
commit
11f00ed46c
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue