QT:day1

思维导图

qt制作暴雪登入器

#include "mywidget.h"

MyWidget::MyWidget(QWidget *parent)
    : QWidget(parent)
{
    this->setWindowTitle("BATTLENET");//总体登陆器设置
    this->resize(455,650);
    this->setStyleSheet("background-color:rgb(21,23,30)");
    this->setWindowIcon(QIcon("D:\\everything"
        "\\p4.png"));
    this->setFixedSize(455,650);



    QLabel *l1=new QLabel(this);//暴雪大logo
    l1->resize(451,162);
    l1->move(0,40);
    //l1->setStyleSheet("background-color:pink");
    l1->setPixmap(QPixmap("D:\\everything"
                "\\screen2024-06-13 191215.png"));


    QLabel *l2=new QLabel(this);//设置图片
    l2->resize(35,35);
    l2->move(380,205);
    l2->setPixmap(QPixmap("D:\\everything"
                "\\sittingpicture.png"));
    l2->setScaledContents(true);



    QLineEdit *edit1=new QLineEdit(this);//账号文本框
    edit1->move(35,250);
    edit1->resize(388,42);
    edit1->setStyleSheet("background-color:rgb(200,200,200)");
    edit1->setPlaceholderText("电子邮箱或手机号码");



    QLineEdit *edit2=new QLineEdit(this);//密码文本框
    edit2->move(35,305);
    edit2->resize(388,42);
    edit2->setStyleSheet("background-color:rgb(200,200,200)");
    edit2->setPlaceholderText("密码");
    edit2->setEchoMode(QLineEdit::Password);


    QLabel *l3=new QLabel(this);//勾选图片
    l3->resize(35,35);
    l3->move(35,350);
    l3->setPixmap(QPixmap("D:\\everything"
                "\\p2.png"));
    //l3->setScaledContents(true);



    QLabel *l4=new QLabel(this);//始终让我保持文字
    l4->resize(192,22);
    l4->move(75,357);
    l4->setPixmap(QPixmap("D:\\everything"
                "\\p3.png"));
    //l3->setScaledContents(true);




    QPushButton *pbu1=new QPushButton("登入",this);//登入按钮
    pbu1->move(25,415);
    pbu1->resize(406,55);
    pbu1->setStyleSheet("background-color:rgb(0,116,224)");


    QPushButton *pbu2=new QPushButton("建立免费的 Battle.net 账号",this);//注册按钮
    pbu2->move(116,515);
    pbu2->resize(223,30);
    pbu2->setStyleSheet("background-color:rgb(0,67,156)");

    QPushButton *pbu3=new QPushButton("无法登入?",this);//无法登录按钮
    pbu3->move(185,565);
    pbu3->resize(97,30);
    pbu3->setStyleSheet("background-color:rgb(0,67,156)");

}

MyWidget::~MyWidget()
{
}

相关推荐

  1. <span style='color:red;'>QTday</span>4

    QTday4

    2024-06-14 12:38:03      59 阅读
  2. <span style='color:red;'>QTday</span>3

    QTday3

    2024-06-14 12:38:03      45 阅读
  3. <span style='color:red;'>QTDay</span>3

    QTDay3

    2024-06-14 12:38:03      31 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-06-14 12:38:03       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-06-14 12:38:03       106 阅读
  3. 在Django里面运行非项目文件

    2024-06-14 12:38:03       87 阅读
  4. Python语言-面向对象

    2024-06-14 12:38:03       96 阅读

热门阅读

  1. 【必会面试题】TCP协议的粘包拆包

    2024-06-14 12:38:03       28 阅读
  2. Python学习系列之三目运算

    2024-06-14 12:38:03       28 阅读
  3. IP地址简介

    2024-06-14 12:38:03       27 阅读
  4. 介绍spark中的模型选择与验证技术

    2024-06-14 12:38:03       28 阅读
  5. C++中的中介者模式

    2024-06-14 12:38:03       31 阅读
  6. linux段异常信号量

    2024-06-14 12:38:03       32 阅读