| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- import QtQuick
- import QtQuick.Controls
- /*
- 登录界面要做的事情:
- 1.加载数据库
- 2.监测网络状态
- 3.校验登录密码
- */
- Rectangle {
- id: loginPage
- width: Qt.platform.os === "android" ? Screen.width : 320
- height: Qt.platform.os === "android" ? Screen.height : 480
- color: "#051f58"
- radius: 8
- border.color: "#ffffff"
- property alias loginpwdSelectionColor: loginpwd.selectionColor
- clip: true
- property alias loginbtn: loginbtn
- property alias loginpwd: loginpwd
- property alias element: element
- property alias timer_time: timer_time
- //定时器
- Timer {
- id: timer_time
- interval: 10 //间隔(单位毫秒):1000毫秒=1秒
- repeat: true //重复
- }
- Image {
- id: loginimage
- source: "../../Res/pic/menu.jpg"
- visible: true
- anchors.fill: parent
- fillMode: Image.PreserveAspectFit
- }
- Button {
- id: loginbtn
- text: "登录"
- flat: false
- font.family: "Arial"
- anchors.centerIn: parent
- }
- Text {
- id: element
- width: 150
- height: 50
- anchors.top: parent.top
- anchors.horizontalCenter: parent.horizontalCenter
- color: "#0dd845"
- text: "qsTr(currentDateTime())"
- font.bold: false
- font.capitalization: Font.MixedCase
- style: Text.Normal
- font.family: "Tahoma"
- transformOrigin: Item.Center
- font.pixelSize: 30
- }
- Rectangle {
- border.width: 5
- border.color: "white"
- width: 150
- height: 50
- anchors.horizontalCenter: loginbtn.horizontalCenter
- anchors.bottom: loginbtn.top
- anchors.bottomMargin: 2
- TextInput {
- id: loginpwd
- color: "#000000"
- text: "******"
- anchors.fill: parent
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- maximumLength: 24
- echoMode: TextInput.Password
- font.bold: true
- font.pointSize: 20
- }
- }
- }
|