QQ登录界面
#include "widget.h"
Widget::Widget(QWidget *parent)
: QWidget(parent)
{
this->setWindowTitle("Tom");
this->setWindowIcon(QIcon("C:/Users/Lenovo/Desktop/pictrue/tom.png"));
this->setStyleSheet("background-color:white");
this->setWindowFlag(Qt::FramelessWindowHint);
this->setFixedSize(540,570);
QLabel* lab1=new QLabel(this);
lab1->resize(540,570);
QMovie* mv1=new QMovie("C:\\Users\\Lenovo\\Desktop\\pictrue\\meimei");
lab1->setMovie(mv1);
mv1->start();
lab1->setScaledContents(true);
QPushButton* B1=new QPushButton("☝",this);
B1->setStyleSheet("background-color:transparent");
B1->resize(30,30);
B1->move(450,0);
QPushButton* B2=new QPushButton("-",this);
B2->setStyleSheet("background-color:transparent");
B2->resize(30,30);
B2->move(480,0);
QPushButton* B3=new QPushButton("×",this);
B3->setStyleSheet("background-color:transparent");
B3->resize(30,30);
B3->move(510,0);
QLabel* lab2=new QLabel(this);
lab2->resize(30,30);
lab2->move(14,14);
lab2->setPixmap(QPixmap("C:\\Users\\Lenovo\\Desktop\\pictrue\\tubiao"));
lab2->setScaledContents(true);
QLabel* lab3=new QLabel(this);
lab3->resize(70,70);
lab3->move(230,340);
lab3->setStyleSheet("background-color:transparent");
lab3->setPixmap(QPixmap("C:\\Users\\Lenovo\\Desktop\\pictrue\\1111"));
lab3->setScaledContents(true);
QLabel* lab4=new QLabel(this);
lab4->resize(20,30);
lab4->move(120,425);
lab4->setPixmap(QPixmap("C:\\Users\\Lenovo\\Desktop\\pictrue\\222"));
lab4->setScaledContents(true);
QLabel* lab5=new QLabel(this);
lab5->resize(20,30);
lab5->move(120,455);
lab5->setPixmap(QPixmap("C:\\Users\\Lenovo\\Desktop\\pictrue\\passwd"));
lab5->setScaledContents(true);
QLineEdit* L1=new QLineEdit(this);
L1->resize(290,30);
L1->move(140,425);
L1->setStyleSheet("background-color:transparent");
QLineEdit* L2=new QLineEdit(this);
L2->resize(290,30);
L2->move(140,455);
L2->setEchoMode(QLineEdit::Password);
L2->setStyleSheet("background-color:transparent");
QPushButton* B4=new QPushButton("登录",this);
B4->resize(310,45);
B4->move(120,490);
B4->setStyleSheet("background-color:rgb(70,178,225);border-radius:5px");
}
Widget::~Widget()
{
}