C++DAY46

 

myWidget::myWidget(QWidget *parent)
    : QWidget(parent)
{

    this->resize(1280,720);
    this->setWindowTitle("300英雄");
    this->setWindowIcon(QIcon("D:/BaiduNetdiskDownload/孤独摇滚图标/1.png"));
    this->setStyleSheet("background-color:white");

    QLabel *lab1 = new QLabel(this);
    lab1->resize(1280,720);
    lab1->setPixmap(QPixmap("D:/Game/300hero_v202308312/LauncherCfg/PatchUINew/1.jpg"));
    lab1->setScaledContents(true);
    QLabel *lab2 = new QLabel(this);
    lab2->resize(140,140);
    lab2->move(1100,100);
    lab2->setPixmap(QPixmap("D:/BaiduNetdiskDownload/孤独摇滚图标/a.gif"));
    lab2->setStyleSheet("background-color:rgba(255, 255, 255, 0)");
    lab2->setScaledContents(true);
    QLabel *lab7 = new QLabel(this);
    lab7->resize(210,94);
    lab7->move(1,10);
    lab7->setPixmap(QPixmap("D:/BaiduNetdiskDownload/孤独摇滚图标/2.gif"));
    lab7->setStyleSheet("background-color:rgba(255, 255, 255, 0)");
    lab7->setScaledContents(true);

    QLineEdit *ed1 = new QLineEdit(this);
    ed1->move(1080,280);
    ed1->setPlaceholderText("账号");
    QLineEdit *ed2 = new QLineEdit(this);
    ed2->setEchoMode(QLineEdit::Password);
    ed2->move(1080,330);
    ed2->setPlaceholderText("密码");

    QLabel *lab3 = new QLabel(this);
    lab3->setText("记住账号");
    lab3->setStyleSheet("background-color:rgba(255, 255, 255, 50)");
    lab3->move(1090,370);
    QLabel *lab4 = new QLabel(this);
    lab4->setText("记住密码");
    lab4->move(1190,370);
    lab4->setStyleSheet("background-color:rgba(255, 255, 255, 50)");
    QLabel *lab5 = new QLabel(this);
    lab5->setText("注册账号");
    lab5->move(1140,400);
    lab5->setStyleSheet("background-color:rgba(255, 255, 255, 50)");
    QLabel *lab6 = new QLabel(this);
    lab6->setText("忘记密码");
    lab6->move(1140,420);
    lab6->setStyleSheet("background-color:rgba(255, 255, 255, 50)");

    QPushButton *btn1 = new QPushButton(this);
    btn1->setText("登录游戏");
    btn1->resize(90,40);
    btn1->move(1125,450);
    btn1->setStyleSheet("background-color:rgba(19,239,253)");





}

你可能感兴趣的:(c++,开发语言)