AicsKnowledgeBase_client/AicsKnowledgeBase/qml/MainWindow.qml

77 lines
1.8 KiB
QML
Raw Normal View History

2023-06-18 00:06:24 +08:00
import QtQuick
import QtQuick.Layouts
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Controls.Basic
import FluentUI
import org.wangwenx190.FramelessHelper
FluWindow {
property bool appBarVisible: true
function setHitTestVisible(com) {
framless_helper.setHitTestVisible(com)
}
function setTitleBarItem(com) {
framless_helper.setTitleBarItem(com)
}
id: window
//color: "transparent"
height: 420
title: "智能客服知识库"
width: 640
FluAppBar {
id: title_bar
title: window.title
visible: appBarVisible
anchors {
left: parent.left
right: parent.right
top: parent.top
}
}
/*FluIconButton {
id: refreshButton
height: 30
iconSize: 13
iconSource: FluentIcons.Sync
width: 30
z: 8
onClicked: {
showSuccess("reload")
loader.reload()
}
anchors {
top: title_bar.bottom
}
}*/
FramelessHelper {
id: framless_helper
onReady: {
setTitleBarItem(title_bar)
moveWindowToDesktopCenter()
setHitTestVisible(title_bar.minimizeButton())
setHitTestVisible(title_bar.maximizeButton())
setHitTestVisible(title_bar.closeButton())
//setHitTestVisible(refreshButton)
title_bar.maximizeButton.visible = true
//if (blurBehindWindowEnabled)
// window.backgroundVisible = false
window.show()
}
}
/* FluRemoteLoader {
id: loader
anchors.fill: parent
source: "file:///D:\\Courses\\Qt\\AicsKnowledgeBase_client\\AicsKnowledgeBase\\qml\\LoginPage.qml"
}*/
LoginPage {
anchors.fill: parent
}
}