import QtQuick 2.9
import QtQuick.Window 2.2
import QtQuick.Controls 2.2
import QtGraphicalEffects 1.0
import QtQuick.Layouts 1.3
ApplicationWindow {
id: root
visible: true
width: Screen.width
height: Screen.height
title: qsTr("登录雷达作战系统")
Component.onCompleted: {
root.visibility = Window.Maximized
}
Image {
anchors.fill: parent
source: "qrc:/img/earth.jpg"
} Item {
width:
height:
anchors.centerIn: parent
//一个圆形图片
Item {
width: parent.width
height: parent.height
Image {
id: rdJpg
anchors.centerIn: parent
smooth: true
visible: false
source: "qrc:/img/rd.jpg"
}
Rectangle {
id: mask
width: parent.width
height: parent.height
radius: width/
visible: false
}
OpacityMask {
anchors.fill: parent
source: rdJpg
maskSource: mask
}
} //用户输入
Item {
width:
height:
anchors.bottom: parent.bottom
anchors.bottomMargin:
anchors.horizontalCenter: parent.horizontalCenter GridLayout {
id: grid
rows:
columns:
width:
height:
columnSpacing:
Text {
text: qsTr("用户名")
font.pointSize:
color: "black"
}
TextField {
id: filedUsr
Layout.preferredHeight:
}
Text {
text: qsTr("密码")
font.pointSize:
color: "black"
}
TextField {
id: filedPawd
Layout.preferredHeight:
}
} //登录按钮
Rectangle {
id: logBtn
width:
height:
color: "#6facf9"
radius:
border.width:
border.color: "black"
Text {
color: "#ffffff"
text: qsTr("登录")
anchors.centerIn: parent
font.pointSize:
}
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: grid.bottom
anchors.topMargin: MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: {
logBtn.color = "#333333"
}
onPressed: {
logBtn.color = "#111111"
}
onReleased: {
logBtn.color = "#333333"
} onExited: {
logBtn.color = "#6facf9"
}
}
}
} } }

最新文章

  1. java分解质因数
  2. 使用html5 canvas绘制圆形或弧线
  3. MySQL查询优化:查询慢原因和解决技巧
  4. RESTheart安装与设置
  5. 漫步支持向量机(svm)之一
  6. 第23章 COM和ActiveX(COM可以实现跨进程跨机器的函数调用)
  7. DJANTO之FORM
  8. CentOS编译安装LNMP环境
  9. JVM总结之GC
  10. A start job is running for xxx to stop
  11. Oracle--新建用户以及赋予的权限
  12. CSS 左右两边底部对齐
  13. ASP.NET Core 防止跨站请求伪造(XSRF/CSRF)攻击 (转载)
  14. BZOJ1266 AHOI2006上学路线(最短路+最小割)
  15. 《Android进阶之光》--RxJava实现RxBus
  16. C# Linq删除父级的同时删除子级
  17. shell和shell脚本基本知识
  18. ELF文件加载与动态链接(二)
  19. 分析redis key大小的几种方法
  20. 【Golang】幽灵变量(变量覆盖)问题的一劳永逸解决方法

热门文章

  1. @PostMapping和@PutMapping区别
  2. JDK源码那些事儿之LinkedBlockingQueue
  3. machine learning(15) --Regularization:Regularized logistic regression
  4. koa-compose 类库学习
  5. 使用其他服务器引入JS文件
  6. 原生JS实现购物车全选多选按钮功能
  7. Mina学习+手写服务端+通过telnet连接服务端
  8. 2019ICPC徐州自我反省及未来打算
  9. NodeJS基础知识
  10. 前端逼死强迫症系列之javascript续集