mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 09:09:53 +02:00
back to master version
This commit is contained in:
parent
c5b998a2a8
commit
232ac74b26
2 changed files with 7 additions and 11 deletions
|
@ -28,7 +28,7 @@ Rectangle {
|
||||||
color: hifi.colors.baseGrayShadow
|
color: hifi.colors.baseGrayShadow
|
||||||
property var currentUrl: "https://metaverse.highfidelity.com/marketplace"
|
property var currentUrl: "https://metaverse.highfidelity.com/marketplace"
|
||||||
|
|
||||||
Controls.WebView {
|
Controls.BaseWebView {
|
||||||
id: webview
|
id: webview
|
||||||
url: currentUrl
|
url: currentUrl
|
||||||
anchors.top: switchMarketView.bottom
|
anchors.top: switchMarketView.bottom
|
||||||
|
@ -48,12 +48,15 @@ Rectangle {
|
||||||
property var autoCancel: 'var element = $("a.btn.cancel");
|
property var autoCancel: 'var element = $("a.btn.cancel");
|
||||||
element.click();'
|
element.click();'
|
||||||
|
|
||||||
newWindowHook: function (component, newWindow) {
|
onNewViewRequested: {
|
||||||
|
var component = Qt.createComponent("Browser.qml");
|
||||||
|
var newWindow = component.createObject(desktop);
|
||||||
|
request.openIn(newWindow.webView);
|
||||||
if (File.isZippedFbx(desktop.currentUrl)) {
|
if (File.isZippedFbx(desktop.currentUrl)) {
|
||||||
runJavaScript(autoCancel);
|
|
||||||
zipTimer.handler = function() {
|
zipTimer.handler = function() {
|
||||||
newWindow.destroy();
|
newWindow.destroy();
|
||||||
};
|
runJavaScript(autoCancel);
|
||||||
|
}
|
||||||
zipTimer.start();
|
zipTimer.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,13 +61,6 @@ 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)
|
|
||||||
newWindowHook(component, newWindow, request);
|
|
||||||
}
|
|
||||||
|
|
||||||
// This breaks the webchannel used for passing messages. Fixed in Qt 5.6
|
// This breaks the webchannel used for passing messages. Fixed in Qt 5.6
|
||||||
// See https://bugreports.qt.io/browse/QTBUG-49521
|
// See https://bugreports.qt.io/browse/QTBUG-49521
|
||||||
|
|
Loading…
Reference in a new issue