QT

#include "mywidget.h"

MyWidget::MyWidget(QWidget *parent)
    : QMainWindow(parent)
{
    this->setWindowTitle(" ");
    this->setWindowIcon(QIcon("D:\\qw\\66.jpeg"));
    this->setStyleSheet("background-color:white");
    this->setWindowFlag(Qt::FramelessWindowHint);
    this->resize(430,330);

    QLabel *lab1  = new QLabel(this);
    lab1->resize(530,160);
    QMovie *mv = new QMovie("D:\\qw\\88.gif");
    lab1->setPixmap(QPixmap("D:\\qw\\88.gif"));
    lab1->setScaledContents(true);
    lab1->setMovie(mv);
    mv->start();
    QLabel *lab2 = new QLabel(this);
    lab2->resize(30,30);
    lab2->move(5,5);
    lab2->setPixmap(QPixmap("D:\\qw\\66.jpeg"));
    lab2->setScaledContents(true);
    QLabel *lab3 = new QLabel(this);
    QLabel *lab4 = new QLabel(this);
    lab3->resize(20,20);
    lab4->resize(20,20);
    lab3 ->move(90,190);
    lab3->setPixmap(QPixmap("D:\\qw\\1.png"));
    lab3->setScaledContents(true);
    lab4->move(90,220);
    lab4->setPixmap(QPixmap("D:\\qw\\2.png"));
    lab4->setScaledContents(true);

    QLineEdit *ed1 = new QLineEdit (this);
    ed1->resize(260,20);
    ed1->move(110,190);
    QLineEdit *ed2 = new QLineEdit (this);
    ed2-> resize(260,20);
    ed2->move(110,220);
    ed2->setEchoMode(QLineEdit::Password);
    ed1->setPlaceholderText("账户:");
    ed2->setPlaceholderText("密码:");




    QPushButton *btn1 = new QPushButton ("登录",this);

    btn1->resize(280,40);
    btn1->move(90,270);
    btn1->setStyleSheet("background-color:rgb(112,214,253);border-radius:4");

    QLabel *ed3 = new QLabel ("自动登录",this);
    QLabel *ed4 = new QLabel ("记住密码",this);
    QLabel *ed5 = new QLabel ("找回密码",this);
    QLabel *lab5 = new QLabel ("注册账号",this);
    ed3->resize(70,15);
    ed4->resize(70,15);
    ed5->resize(70,15);
    ed3->move(110,250);
    ed4->move(200,250);
    ed5->move(290,250);
    lab5->resize(70,15);
    lab5->move(5,300);
    ed3->setScaledContents(true);

    QLabel *lab6 =new QLabel(this);
    lab6->setPixmap(QPixmap("D:\\qw\\4.jpg"));
    lab6->resize(60,60);
    lab6->move(190,120);
    lab6->setScaledContents(true);

}

MyWidget::~MyWidget()
{
}

QT_第1张图片

你可能感兴趣的:(qt,数据库,java)