qt ui设计案例--登录界面

登录界面

要实现这个界面就非常简单了,准备一张图片就行。

lable样式:

css 复制代码
QLabel{
	border-image: url(":/nxd.jpg");
	background-position:center;
	min-width: 100px;
    min-height: 100px;
    border-radius: 50px;
	
}

搞一个圆背景贴一张图片就行

在登录与头像之间随便贴点文字,再修改一下样式就行

登录按钮采用三元渐变色,qt有自带设计颜色的功能

最后修改一下qpushbutton的交互样式就行了

css 复制代码
QPushButton {              
	border-radius:20;  
	background-color:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0.204545 rgba(150, 214, 205, 255), stop:1 rgba(239, 193, 246, 255));
	color: #F0F0F0;
}
QPushButton:hover {            
	border-radius:20;  
	background-color:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0.204545 rgba(211, 214, 205, 255), stop:1 rgba(239, 193, 246, 255));
	color: #F0F0F0;
}
QPushButton:pressed {        
	border-radius:20;  
	background-color:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0.204545 rgba(150, 214, 205, 255), stop:1 rgba(239, 193, 246, 255));
	color: #F0F0F0;
	padding-left:2px;
	padding-top:3px;
}

最终效果:

相关推荐
Yasin Chen1 天前
Unity UI坐标说明
ui·unity
我是菜鸟0713号1 天前
Qt 中 OPC UA 通讯实战
开发语言·qt
JCBP_1 天前
QT(4)
开发语言·汇编·c++·qt·算法
lqjun08271 天前
Qt程序单独运行报错问题
开发语言·qt
酷飞飞2 天前
Qt Designer与事件处理
开发语言·qt·命令模式
mkhase2 天前
9.12-QT-基本登陆界面实现
java·jvm·qt
咕噜咕噜啦啦2 天前
Qt之快捷键、事件处理、自定义按键——完成记事本项目
开发语言·qt
Quz2 天前
QML Charts组件之折线图的鼠标交互
qt
眠りたいです2 天前
基于脚手架微服务的视频点播系统-数据管理与网络通信部分的预备工作
c++·qt·ui·微服务·云原生·架构·媒体
bikong72 天前
Qt/C++,windows多进程demo
c++·windows·qt