【QT】登陆界面QICQ_2000

cpp 复制代码
#include "mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    this->setWindowTitle("hh");
    this->resize(300,270);
    this->setStyleSheet("background: #eeeeee;");
    this->setWindowFlag(Qt::FramelessWindowHint);

    //背景渐变
    QLabel *l8 = new QLabel;
    l8->setParent(this);
    l8->move(0,0);
    l8->setStyleSheet("background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #a0cfff, stop:1 #ffffff);");
    l8->resize(300,270);

    //登陆按钮
    QPushButton *btn2 = new QPushButton;
    btn2->setParent(this);
    btn2->setText("登陆");
    btn2->resize(200,30);
    btn2->move(40,180);
    btn2->setStyleSheet("background-color:#2979ff;border-radius: 10px;");

    //输入框-账号
    QLineEdit *input1 = new QLineEdit;
    input1->setParent(this);
    input1->move(40,100);
    input1->resize(200,30);
    input1->setStyleSheet("background-color:white;color:black;padding-left:5px;font-size:13px;");
    input1->setPlaceholderText("用户名/手机号");

    //输入框-密码
    QLineEdit *input2 = new QLineEdit;
    input2->setParent(this);
    input2->move(40,140);
    input2->resize(200,30);
    input2->setStyleSheet("background-color:white;color:black;padding-left:5px;font-size:13px;");
    input2->setPlaceholderText("密码");
    input2->setEchoMode(QLineEdit::Password);

    //标签功能
    QLabel *l1 = new QLabel;
    l1->setParent(this);
    l1->move(40,220);
    l1->setStyleSheet("color:#82848a;background: transparent;");
    l1->resize(55,20);
    l1->setText("找回密码");

    QLabel *l2 = new QLabel;
    l2->setParent(this);
    l2->move(110,220);
    l2->setStyleSheet("color:#82848a;background: transparent;");
    l2->resize(55,20);
    l2->setText("注册账号");

    QLabel *l3 = new QLabel;
    l3->setParent(this);
    l3->move(180,220);
    l3->setStyleSheet("color:#82848a;background: transparent;");
    l3->resize(55,20);
    l3->setText("联系客服");

    //logo组 QICQ_2000
    QLabel *l4 = new QLabel;
    l4->setParent(this);
    l4->move(50,0);
    l4->setStyleSheet("color:black;font-size:50px;background: transparent;");
    l4->resize(150,100);
    l4->setText("QICQ");

    QLabel *l5 = new QLabel;
    l5->setParent(this);
    l5->move(180,0);
    l5->setStyleSheet("color:black;font-size:20px;background: transparent;");
    l5->resize(150,100);
    l5->setText("2000");

    //最小化图标
    QLabel *l6 = new QLabel;
    l6->setParent(this);
    l6->move(260,3);
    l6->setStyleSheet("color:black;font-size:12px;font-weight:bold;background: transparent;");
    l6->resize(12,12);
    l6->setText("一");

    //关闭图标
    QLabel *l7 = new QLabel;
    l7->setParent(this);
    l7->move(280,3);
    l7->setStyleSheet("color:black;font-size:12px;font-weight:bold;background: transparent;");
    l7->resize(12,12);
    l7->setText("X");







}

MainWindow::~MainWindow() {}
相关推荐
VBA63375 分钟前
VBA数据库解决方案第十五讲:Recordset集合中单个数据的精确处理
开发语言
wrx繁星点点9 分钟前
事务的四大特性(ACID)
java·开发语言·数据库
不写八个15 分钟前
Python办公自动化教程(005):Word添加段落
开发语言·python·word
HEX9CF20 分钟前
【CTF Web】Pikachu xss之href输出 Writeup(GET请求+反射型XSS+javascript:伪协议绕过)
开发语言·前端·javascript·安全·网络安全·ecmascript·xss
小小娥子38 分钟前
Redis的基础认识与在ubuntu上的安装教程
java·数据库·redis·缓存
DieSnowK40 分钟前
[Redis][集群][下]详细讲解
数据库·redis·分布式·缓存·集群·高可用·新手向
赵荏苒1 小时前
Python小白之Pandas1
开发语言·python
丶Darling.1 小时前
代码随想录 | Day26 | 二叉树:二叉搜索树中的插入操作&&删除二叉搜索树中的节点&&修剪二叉搜索树
开发语言·数据结构·c++·笔记·学习·算法
人生の三重奏1 小时前
前端——js补充
开发语言·前端·javascript
平凡的小码农1 小时前
JAVA实现大写金额转小写金额
java·开发语言