QT10_16

X-mind

QT10_16_第1张图片

#include "mywidget.h"

MyWidget::MyWidget(QWidget *parent)
    : QWidget(parent)
{
    this->resize(536,412);
    this->setWindowTitle(" 坤坤之家");
    this->setWindowIcon(QIcon("D:/Ubuntushare/preview.gif"));
    this->setWindowFlag(Qt::FramelessWindowHint);
    //标签
    QLabel *la1 =new QLabel(this);
    la1->setPixmap(QPixmap("D:/Ubuntushare/preview.gif"));
    la1->resize(30,30);
    la1->move(125,220);
     la1->setScaledContents(true);

    QLabel *la2 =new QLabel(this);
    la2->resize(179,155);
    QMovie *mv = new QMovie("D:/Ubuntushare/1.gif");
    la2->setMovie(mv);
    mv->start();
    la2->setScaledContents(true);

    QLabel *la3=new QLabel(this);
    la3->resize(30,30);
    la3->setPixmap(QPixmap("D:/Ubuntushare/preview.gif"));
    la3->move(125,260);
     la3->setScaledContents(true);

    QLabel *la4 = new QLabel(this);
    la4->move(10,10);
    la4->setPixmap(QPixmap("D:/Ubuntushare/preview.gif"));
    la4->resize(40,40);
    la4->setScaledContents(true);

    QLabel *la5 =new QLabel(this);
    la5->move(179,0);
    la5->resize(179,155);
    la5->setMovie(mv);
    mv->start();
    la5->setScaledContents(true);

    QLabel *la6 =new QLabel(this);
    la6->move(358,0);
    la6->resize(179,155);
    la6->setMovie(mv);
    mv->start();
    la6->setScaledContents(true);

    QLabel *la7 = new QLabel(this);
    la7->move(135,305);
    la7->resize(65,20);
    la7->setText("自动登录");

    QLabel *la8 = new QLabel(this);
    la8->move(240,305);
    la8->resize(65,20);
    la8->setText("注册登录");

    QLabel *la9 = new QLabel(this);
    la9->move(355,305);
    la9->resize(65,20);
    la9->setText("找回密码");

    QLabel *la10 = new QLabel(this);
    la10->move(15,380);
    la10->resize(65,20);
    la10->setText(" 注册账号");

    QLabel *la11 = new QLabel(this);
    la11->resize(85,85);
    la11->move(225,110);
    la11->setPixmap(QPixmap("D:/Ubuntushare/preview.gif"));
    la11->setScaledContents(true);
    //文本框

    QLineEdit *ed1 = new QLineEdit(this);
    ed1->move(165,220);
    ed1->resize(250,30);
    ed1->setPlaceholderText("爱坤号");


    QLineEdit *ed2 = new QLineEdit(this);
    ed2->move(165,260);
    ed2->resize(250,30);
    ed2->setPlaceholderText("密码");
    ed2->setEchoMode(QLineEdit::Password);


//按钮
    QPushButton *pbt =new QPushButton(QIcon("D:/Ubuntushare/preview.gif")," 唱跳rap",this);
    pbt->setStyleSheet("background-color:rgb(30,150,255);border-radius:8px");
    pbt->resize(300,50);
    pbt->move(120,340);

}
MyWidget::~MyWidget()
{

}

QT10_16_第2张图片

你可能感兴趣的:(qt)