#include "project1.h"
project1::project1(QWidget *parent)
: QWidget(parent)
{
this->setFixedSize(700,520);
this->setWindowFlag(Qt::FramelessWindowHint);
this->setStyleSheet("background-color:white");
//this->
//登录
QPushButton *btn1=new QPushButton(this);
btn1->setText("登录");
btn1->resize(400,60);
btn1->move(150,440);
btn1->setStyleSheet("color:white;background-color:skyblue;border-radius:10px;");
//账号
QLineEdit *edit1 =new QLineEdit("QQ账号/手机/邮箱",this);
edit1->resize(400,50);
edit1->clear();
edit1->move(btn1->x(),270);
edit1->setPlaceholderText("QQ账号/手机/邮箱");
//密码
QLineEdit *edit2 =new QLineEdit("密码",this);
edit2->resize(400,50);
edit2->clear();
edit2->move(btn1->x(),edit1->y()+70);
edit2->setPlaceholderText("密码");
edit2->setEchoMode(QLineEdit::Password);
//注册账号
QLabel *lab1 =new QLabel(this);
lab1->setText("注册账号");
lab1->resize(80,80);
lab1->move(10,btn1->y()+20);
lab1->setStyleSheet("color:black;");
//背景图片
QLabel *lab2 =new QLabel(this);
lab2->resize(700,200);
lab2->move(0,0);
lab2->setPixmap(QPixmap("C:/Users/阿辉/Pictures/Saved Pictures/1.jpg"));
//自动登录
QCheckBox *chB1 =new QCheckBox("自动登录",this);
chB1->move(btn1->x(),edit1->y()+130);
//记住密码
QCheckBox *chB2 =new QCheckBox("记住密码",this);
chB2->move(btn1->x()+150,edit1->y()+130);
//找回密码
QLabel *lab3 =new QLabel(this);
lab3->setText("找回密码");
lab3->resize(80,21);
lab3->move(chB2->x()+150,edit1->y()+130);
lab3->setStyleSheet("color:black;");
//LOGO
QLabel *lab4 =new QLabel(this);
lab4->setText("QQ");
lab4->resize(100,40);
lab4->move(10,0);
lab4->setFont(QFont("Arial",20));
lab4->setStyleSheet("color:white;background-color:transparent;");
//设置
QPushButton *btn3=new QPushButton(this);
btn3->setText("设置");
btn3->resize(50,50);
btn3->move(540,0);
btn3->setStyleSheet("color:white;background-color:transparent;border-radius:10px;");
//缩小
QPushButton *btn4=new QPushButton(this);
btn4->setText("缩小");
btn4->resize(50,50);
btn4->move(590,0);
btn4->setStyleSheet("color:white;background-color:transparent;border-radius:10px;");
//关闭
QPushButton *btn5=new QPushButton(this);
btn5->setText("关闭");
btn5->resize(50,50);
btn5->move(640,0);
btn5->setStyleSheet("color:white;background-color:transparent;border-radius:10px;");
}
project1::~project1()
{
}
09-28
175
09-28
100
09-28
95
09-28
61