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;
}

最终效果:

相关推荐
xcyxiner3 天前
DicomViewer (dcmtk读取dcm文件)5
qt
xcyxiner4 天前
DicomViewer (后台线程处理文件)4
qt
xcyxiner4 天前
DicomViewer (添加模型类)3
qt
xcyxiner5 天前
DicomViewer (目录调整) 2
qt
xcyxiner5 天前
dcmtk vtk vtk-dicom(gdcm) 编译(debug) v2
qt
laowangpython7 天前
Photoshop 2025 下载安装全攻略
其他·ui·photoshop
桥田智能7 天前
桥田智能 QT-650S:面向白车身焊装的 800kg 重载快换解决方案
开发语言·qt·系统架构
森G7 天前
75、服务器源码解析---------云视频服务项目
linux·服务器·网络·c++·qt
风华圆舞7 天前
Flutter + 鸿蒙 Intents Kit:页面直达能力的完整接入方案
flutter·ui·华为·harmonyos
鲲穹AI超级员工7 天前
多款实用配色工具汇总,适配设计、UI 创作等多元场景
ui·色彩设计