#include "mywidget.h"
MyWidget::MyWidget(QWidget *parent)
: QWidget(parent)
{
this->setWindowTitle("QQ");//窗口名
this->setWindowIcon(QIcon("C:\\Users\\a8360\\Desktop\\4f603444-8a85-4d52-94d7-ab8c2f5f54a0.png"));
this->resize(636,900);
QLabel *lab1 = new QLabel(this);//背景图
lab1->resize(636,950);
lab1->setPixmap(QPixmap("C:\\Users\\a8360\\Desktop\\QQ截图20240613184234.png"));
lab1->setScaledContents(1);
QLabel *lab2 = new QLabel(this);//头像
lab2->move(240,200);
lab2->resize(150,150);
lab2->setPixmap((QPixmap("C:\\Users\\a8360\\Desktop\\FEC3F6345EA0818BB10E1442043B2FF6.png")));
lab2->setScaledContents(1);
QLineEdit *edin1 = new QLineEdit(this);//账号框
edin1->resize(400,50);
edin1->move(120,430);
edin1->setStyleSheet("background:transparent;border-width:9;border-style:ridge;border: 1px solid rgb(90,90,90);");
edin1->setPlaceholderText("输入QQ号");
QPalette palette = edin1->palette();
palette.setColor(QPalette::Normal, QPalette::PlaceholderText, Qt::gray);
edin1->setPalette(palette);
QLineEdit *edin2 = new QLineEdit(this);//密码框
edin2->resize(400,50);
edin2->move(120,500);
edin2->setStyleSheet("background:transparent;border-width:9;border-style:ridge;border: 1px solid rgb(90,90,90);");
edin2->setPlaceholderText("输入QQ密码");
edin2->setEchoMode(QLineEdit::Password);
QPalette palette2 = edin2->palette();
palette2.setColor(QPalette::Normal, QPalette::PlaceholderText, Qt::gray);
edin2->setPalette(palette);
QPushButton *btn1 = new QPushButton(this);//霸王条款按钮
btn1->resize(15,20);
btn1->move(90,575);
QLineEdit *edin3 = new QLineEdit("已阅读并同意服务协议和QQ隐私保护指引",this);//霸王条款文本
edin3->move(115,560);
edin3->resize(450,50);
edin3->setStyleSheet("background:transparent;border-width:0;border-style:ridge;""color: gray;");
QPushButton *btn2 = new QPushButton(this);//登录按钮
btn2->resize(400,50);
btn2->move(120,650);
btn2->setStyleSheet("background-color:rgb(30,48,98)");
QLineEdit *edin4 = new QLineEdit("登录",this);//登录文本
edin4->move(290,650);
edin4->resize(100,50);
edin4->setStyleSheet("background:transparent;border-width:0;border-style:ridge;""color: gray;");
QLineEdit *edin5 = new QLineEdit("扫码登录 | 更多选项",this);//更多文本
edin5->move(175,750);
edin5->resize(400,50);
edin5->setStyleSheet("background:transparent;border-width:0;border-style:ridge;""color: rgb(45,119,229);");
}
MyWidget::~MyWidget()
{
}
思维导图没时间写了,我就问你这界面做的ne~不ne~吧!(行不行吧!)输入框和文本都改了色。