01-08

 盗版UI

#include "mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    //设置窗口大小
    this->setFixedSize(881,550);
    this->setStyleSheet("background-color:rgb(33,35,40)");
    this->setWindowFlag(Qt::FramelessWindowHint);
    //设置输入文本
    QLineEdit *name=new QLineEdit(this);
    name->move(55,150);
    name->resize(482,54);
    name->setStyleSheet("background-color:rgb(50,53,60);border-radius:2px;color:white");
    name->setPlaceholderText("邮箱/手机/用户名");
    QLineEdit *passwd=new QLineEdit(this);
    passwd->move(55,240);
    passwd->resize(482,54);
    passwd->setStyleSheet("background-color:rgb(50,53,60);border-radius:2px;color:white");
    passwd->setEchoMode(QLineEdit::Password);
    //设置文字标签
    QLabel *namewd=new QLabel("用账户名称登录",this);
    namewd->move(55,130);
    namewd->resize(110,20);
    namewd->setStyleSheet("background-color:rgb(33,35,40);color:rgb(25,153,255)");
    QLabel *pawd=new QLabel("密码",this);
    pawd->move(55,220);
    pawd->resize(110,20);
    pawd->setStyleSheet("background-color:rgb(33,35,40);color:rgb(175,175,175)");
    //设置图片标签
    QLabel *logo=new QLabel(this);
    logo->move(31,26);
    logo->setFixedSize(307,77);
    logo->setPixmap(QPixmap("C:\\Users\\12192\\Desktop\\pictrue\\logoo.png"));
    logo->setScaledContents(1);
    //设置按钮
    QPushButton *cancel=new QPushButton("×",this);
    cancel->move(841,0);
    cancel->resize(40,40);
    cancel->setStyleSheet("background-color:rgb(226,42,39);color:white");
    QPushButton *enter=new QPushButton("登录",this);
    enter->move(126,343);
    enter->setFixedSize(340,60);
    enter->setStyleSheet("background-color:rgb(25,156,255);color:white");
    //设置动图
    QLabel *mo=new QLabel(this);
    mo->move(600,100);
    mo->setFixedSize(125,125);
    QMovie *monster=new QMovie("C:\\Users\\12192\\Desktop\\pictrue\\monster.gif");
    mo->setMovie(monster);
    monster->start();
    mo->setScaledContents(1);

    QLabel *we=new QLabel(this);
    we->move(600,275);
    we->setFixedSize(125,125);
    QMovie *weapon=new QMovie("C:\\Users\\12192\\Desktop\\pictrue\\weapon.gif");
    we->setMovie(weapon);
    weapon->start();
    we->setScaledContents(1);
}

MainWindow::~MainWindow()
{

}

  • 7
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值