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

最终效果:

相关推荐
weixin_4196583129 分钟前
UISpy:Windows 界面控件的“显微镜“[特殊字符]
windows·python·测试工具·ui
天燹31 分钟前
Qt 6 嵌入 Android 原生应用完整教程
android·开发语言·qt
liu****42 分钟前
第一章 Qt 概述
开发语言·c++·qt
陌路201 小时前
RPC分布式通信(5)--发布 RPC 服务、处理客户端调用请求
分布式·qt·rpc
少控科技2 小时前
QT进阶日记004
开发语言·qt
2301_818732063 小时前
ui库写表单,格式问题可能的原因
ui
抠脚学代码3 小时前
Qt与Linux
linux·数据库·qt
机器视觉知识推荐、就业指导3 小时前
Qt 6 所有 C++ 类(官方完整清单 · 原始索引版)
开发语言·c++·qt
凯子坚持 c4 小时前
在 Visual Studio 2019 中配置 Qt 插件开发环境:编译原理 + 底层逻辑解析
ide·qt·visual studio
枫叶丹45 小时前
【Qt开发】Qt系统(八)-> Qt UDP Socket
c语言·开发语言·c++·qt·udp