yxdy a44db97aa3
Some checks failed
Gallery App Build / Windows (push) Has been cancelled
Gallery App Build / macOS (push) Has been cancelled
Gallery App Build / Ubuntu (push) Has been cancelled
init
2025-02-12 10:31:20 +08:00

64 lines
1.6 KiB
QML

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
}
}
}