this -> setFixedSize(540, 410); //固定窗口大小
this -> setWindowTitle("啊啊啊"); //设置窗口标题
this -> setWindowIcon(QIcon("E:/1.png")); //设置窗口图标
QLabel *lab1 = new QLabel(this); //构造一个标签
lab1 -> setPixmap(QPixmap("C:/Users/yc/Desktop/icon/logo.png")); //标签中添加图片
lab1 -> setScaledContents(true); //设置图片自适应
lab1 -> move(0, 0); //标签位置
lab1 -> resize(540,150); //标签大小
QLabel *lab2 = new QLabel(this); //构建账户标签
lab2 -> setPixmap(QPixmap("C:/Users/yc/Desktop/icon/userName.jpg")); //标签中添加图片
lab2 -> setScaledContents(true); //设置图片自适应
lab2 -> move(80, 200); //标签位置
lab2 -> resize(50,50); //标签大小
QLabel *lab3 = new QLabel(this); //构建密码标签
lab3 -> setPixmap(QPixmap("C:/Users/yc/Desktop/icon/passwd.jpg")); //标签中添加图片
lab3 -> setScaledContents(true); //设置图片自适应
lab3 -> move(80, 280); //标签位置
lab3 -> resize(50,50); //标签大小
QLineEdit *edit1 = new QLineEdit(this);
edit1 -> setPlaceholderText("QQ号码/手机号/邮箱");
edit1 -> move(180, 200);
edit1 -> resize(300,50);
QLineEdit *edit2 = new QLineEdit(this);
edit2 -> setPlaceholderText("密码");
edit2 -> setEchoMode(QLineEdit::Password);
edit2 -> move(180, 280);
edit2 -> resize(300,50);
QPushButton *btn1 = new QPushButton(QIcon("C:/Users/yc/Desktop/icon/login.png"),"登录",this);
btn1 -> move(260, 350);
btn1 -> resize(100, 40);
QPushButton *btn2 = new QPushButton(QIcon("C:/Users/yc/Desktop/icon/cancel.png"),"取消",this);
btn2 -> move(380, 350);
btn2 -> resize(100, 40);