11.13作业

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()
{
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值