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

最终效果:

相关推荐
天天进步201512 小时前
UI-TARS 源码解析 #14:parse_action_to_structure_output:从 Thought/Action 文本到动作字典
ui
隐积13 小时前
3.1.7.Qt容器大家族(3):QVariant——万能盒子
开发语言·qt
_ZHOURUI_H_1 天前
Unity MyFramework 用法说明(二十五):使用 AtlasManager 统一管理图集与 Sprite 引用
ui·unity·游戏引擎·unity3d·游戏开发
不如摸鱼去1 天前
Wot UI 2.3.0 发布:二维码组件来了,Open Wot 与 wot-starter 同步更新
前端·ui·微信小程序·前端框架·uni-app
熬夜苦读学习1 天前
Qt-- 系统相关
开发语言·qt
Quz1 天前
QML Tumbler 基础用法:多滚轮选择与自定义外观
qt
Quz1 天前
QML SpinBox 动画效果:缩放反馈与数字滚动
qt
小灰灰搞电子2 天前
Qt 实现魔法导航菜单源码分享
开发语言·qt
Quz2 天前
QML SpinBox 基础与步长控制:可编辑输入与自定义步长
qt
隐积2 天前
Qt魔法之旅 · 全系列课程导航
qt