Qt day01
#include "widget3.h"
#include<QDebug>
#include<QPushButton>
#include<QLineEdit>
#include<QLabel>
Widget3::Widget3(QWidget *parent)
: QWidget(parent)
{
qDebug()<<"这个界面的标题"<<this->windowTitle();
this->setWindowTitle("登陆界面");
this->setFixedSize(400,700);
this->setStyleSheet("background-color:skyblue;");
QPushButton *button1=new QPushButton;
button1->setParent(this);
button1->setText("登录");
button1->resize(80,40);
button1->move(170,500);
button1->setStyleSheet("color:black;background-color:white;");
QPushButton *button2=new QPushButton;
button2->setParent(this);
button2->setText("取消");
button2->resize(80,40);
button2->move(300,500);
button2->setStyleSheet("color:black;background-color:white;");
QLineEdit *edit1=new QLineEdit;
edit1->setParent(this);
edit1->resize(250,40);
edit1->move(100,400);
edit1->clear();
edit1->setPlaceholderText("输入密码");
edit1->setEchoMode(QLineEdit::Password);
edit1->setStyleSheet("background-color:white;");
QLineEdit *edit2=new QLineEdit;
edit2->setParent(this);
edit2->resize(250,40);
edit2->move(100,300);
edit2->clear();
edit2->setPlaceholderText("输入账号");
edit2->setStyleSheet("background-color:white;");
QLabel *label1=new QLabel;
label1->setParent(this);
label1->resize(60,40);
label1->move(30,300);
label1->setText("账号");
QLabel *label2=new QLabel;
label2->setParent(this);
label2->resize(60,40);
label2->move(30,400);
label2->setText("密码");
QLabel *label3=new QLabel;
label3->setParent(this);
label3->resize(200,200);
label3->move(100,50);
label3->setPixmap(QPixmap("C:\\Users\\yangh\\Desktop\\e3709eb5dcbcb29fcbb2eaf59b26d4a.png"));
}
Widget3::~Widget3()
{
}