Qt作业六

#include "mylx.h"

Mylx::Mylx(QWidget *parent)
    : QMainWindow(parent)
{
    //设置窗口大小
    resize(650,500);
    //去掉X
    //setWindowFlag(Qt::FramelessWindowHint);
    //设置窗口颜色
    setStyleSheet("background-color:white");
    //动态标签
    QLabel *lb1=new QLabel(this);
    lb1->resize(650,190);
    QMovie *mv=new QMovie("D:\\QT\\QT\\1.gif");
    lb1->setMovie(mv);
    mv->start();
    //左上角小标签
    QLabel *lb2=new QLabel(this);
    lb2->setPixmap(QPixmap("D:\\QT\\QT\\4.webp"));
    lb2->setGeometry(20,20,60,60);
    lb2->setStyleSheet("background-color:transparent");
    lb2->setScaledContents(true);
    //输入图标
    QLabel *lb3=new QLabel(this);
    lb3->setPixmap(QPixmap("D:\\QT\\QT\\4.webp"));
    lb3->setGeometry(140,260,40,40);
    lb3->setStyleSheet("background-color:transparent");
    lb3->setScaledContents(true);

    QLabel *lb4=new QLabel(this);
    lb4->setPixmap(QPixmap("D:\\QT\\QT\\6.webp"));
    lb4->setGeometry(145,330,30,30);
    lb3->setStyleSheet("background-color:transparent");
    lb4->setScaledContents(true);

    //输入行类编辑器
    QLineEdit *ld1=new QLineEdit(this);
    ld1->setGeometry(180,260,330,40);
    ld1->setPlaceholderText("姓名");

    QLineEdit *ld2=new QLineEdit(this);
    ld2->setGeometry(180,330,330,40);
    ld2->setEchoMode(QLineEdit::Password);
    ld2->setPlaceholderText("密码");

    //登录按钮
    QPushButton *pb1=new QPushButton(this);
    pb1->setText("登录");
    pb1->setGeometry(145,420,360,60);
    pb1->setStyleSheet("background-color:blue");
}

Mylx::~Mylx()
{
}

你可能感兴趣的:(数据库,服务器,运维)