MyWidget::MyWidget(QWidget *parent)
: QWidget(parent)
, ui(new Ui::MyWidget)
{
//隐藏窗口默认栏
this->resize(535,330);
this->setWindowFlag(Qt::FramelessWindowHint);
//动图背景
QLabel *lab1=new QLabel(this);
QMovie *mv=new QMovie("C:\\Users\\不鱼\\Desktop\\pictrue\\pictrue\\zz.gif");
lab1->setMovie(mv);
mv->start();
lab1->resize(535,330);
//lab1->move(0,20);
lab1->setScaledContents(true);
//头像
QLabel* lab2=new QLabel(this);
lab2->setPixmap(QPixmap("C:\\Users\\不鱼\\Desktop\\pictrue\\pictrue\\lxhdl.jpeg"));
lab2->setScaledContents(true);
lab2->resize(125,77);
lab2->move(200,50);
//账号
QLabel *lab3=new QLabel(this);
lab3->setPixmap(QPixmap("C:\\Users\\不鱼\\Desktop\\pictrue\\pictrue\\lxhzh.png"));
lab3->resize(30,30);
lab3->setScaledContents(true);
lab3->move(130,130);
QLineEdit * edit1=new QLineEdit(this);
edit1->resize(220,30);
edit1->move(lab3->x()+30,lab3->y());
edit1->setStyleSheet("background-color:rgb(172,180,133)");
edit1->setPlaceholderText("账号/邮箱/手机号");
//密码
QLabel *lab4=new QLabel(this);
lab4->setPixmap(QPixmap("C:\\Users\\不鱼\\Desktop\\pictrue\\pictrue\\lxhmm.png"));
lab4->resize(30,30);
lab4->setScaledContents(true);
lab4->move(lab3->x(),lab3->y()+48);
QLineEdit * edit2=new QLineEdit(this);
edit2->resize(220,30);
edit2->move(lab4->x()+30,lab4->y());
edit2->setStyleSheet("background-color:rgb(172,180,133)");
edit2->setPlaceholderText("密码");
edit2->setEchoMode(QLineEdit::PasswordEchoOnEdit);
//登录
QPushButton * but1=new QPushButton("登录",this);
but1->resize(250,48);
but1->move(lab4->x(),lab4->y()+66);
but1->setStyleSheet("background-color:rgb(172,180,133)");
//退出
QPushButton * but2=new QPushButton("退出",this);
but2->resize(77,48);
but2->move(but1->x()+270,but1->y());
but2->setStyleSheet("background-color:rgb(172,180,133)");
}