import QtQuick import QtQuick.Layouts import QtQuick.Controls import FluentUI.Controls import FluentUI.impl import QtWebEngine import QtWebChannel ScrollablePage { title: "Map" QtObject { id: qtObject WebChannel.id: "channelqtObject" signal signaltest(var test) function getBodyHeight(bodyHeight) { showSuccess("aaa" + bodyHeight) } } WebChannel { id: myChannel registeredObjects: [qtObject] } ColumnLayout{ spacing: 10 anchors.topMargin: 10 anchors.bottomMargin: 10 anchors.rightMargin: 10 anchors.leftMargin: 10 anchors.fill: parent implicitHeight: parent.height Button{ text:"Standard Button" Layout.fillHeight: false onClicked: { console.log("click") webQues.runJavaScript("js_getBodyHeight()",null) } } WebEngineView { Layout.fillHeight: true Layout.fillWidth: true Layout.alignment: Qt.AlignBottom Layout.preferredWidth: 500 Layout.preferredHeight: 60230 id: webQues url: "http://123.6.102.119:86/" // http://123.6.102.119:86/ settings.localContentCanAccessRemoteUrls: true settings.localContentCanAccessFileUrls: false settings.pluginsEnabled: false settings.fullScreenSupportEnabled: true settings.screenCaptureEnabled: false webChannel: myChannel } } }