41 lines
1.1 KiB
QML
41 lines
1.1 KiB
QML
import QtQuick
|
|
import QtQuick.Window
|
|
import ESP32_upper 1.0
|
|
|
|
Window {
|
|
width: 1300
|
|
height: 750
|
|
visible: true
|
|
title: qsTr("ESP32上位机")
|
|
minimumHeight: 600
|
|
minimumWidth: 800
|
|
// color: "green"
|
|
|
|
property var sharedData: ({
|
|
counter: 0 ,
|
|
gp_inited: 0,
|
|
global_banner: "Hello World",
|
|
left_menu_index_now: 0,
|
|
left_menu_index_last: 255,
|
|
left_menu_lighlight_color: "#FF00FF",
|
|
left_menu_non_lighlight_color: "#00FF00",
|
|
left_menu_focus_color: "#FAFA00",
|
|
left_menu_icon_color: "#0d4e8b",
|
|
font_info_pixel_size: 20,
|
|
btn_normalBackground: "#FFFFFF", // 白色// 正常状态的背景
|
|
btn_hoverBackground: "#F0F0F0", // 浅灰色// hover 状态的背景
|
|
btn_pressedBackground: "#D0D0D0", // 深灰色// pressed 状态的背景
|
|
btn_borderColor: "#000000", // 深灰色// pressed 状态的背景
|
|
port_name_list_model: ListModel
|
|
})
|
|
|
|
MainPage {
|
|
id: id_home_page
|
|
}
|
|
|
|
Component.onCompleted: {
|
|
console.log(sharedData.counter); // 输出初始值
|
|
sharedData.gp_inited = 1
|
|
}
|
|
}
|