4/7 QT_day1

#include "mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    //窗口设置
    this->setWindowTitle("小黑子(little black son)");
    this->setWindowIcon(QIcon("D:\\qq文件\\Pitrue\\pictrue\\black.jpg"));
    this->setStyleSheet("background-color:white");
    this->resize(537,413);
    this->setFixedSize(535,415);
    //this->setWindowFlag(Qt::FramelessWindowHint);


    //设置按钮
    QPushButton *btn1 = new QPushButton("自动登录",this);
    btn1->move(121,307);
    btn1->resize(83,18);

    QPushButton *btn2 = new QPushButton("记住密码",this);
    btn2->move(239,307);
    btn2->resize(83,18);

    QPushButton *btn3 = new QPushButton("找回密码",this);
    btn3->move(358,307);
    btn3->resize(60,18);

    QPushButton *btn4 = new QPushButton("登录",this);
    btn4->move(121,342);
    btn4->resize(298,45);
    btn4->setStyleSheet("background-color:rgb(7,188,252);color:white;border-radius:10px");

    QPushButton *btn5 = new QPushButton("注册账号",this);
    btn5->move(16,384);
    btn5->resize(61,16);

    //设置行编译器
    QLineEdit *edit1 = new QLineEdit(this);
    edit1->setPlaceholderText("ikun账号");
    edit1->move(145,218);
    edit1->resize(247,20);


    QLineEdit *edit2 = new QLineEdit(this);
    edit2->setPlaceholderText("ikun码");
    edit2->move(145,247);
    edit2->resize(247,20);


    //设置标签
    QLabel *lab1 = new QLabel(this);
    lab1->resize(537,158);

    QMovie *mv = new QMovie("D:\\qq文件\\Pitrue\\pictrue\\cxk.gif");
    mv->setParent(this);
    lab1->setMovie(mv);
    mv->start();
    lab1->setScaledContents(true);

    QLabel *lab2 = new QLabel("标签",this);
    lab2->move(15,16);
    lab2->resize(28,34);
    lab2->setPixmap(QPixmap("D:\\qq文件\\Pitrue\\pictrue\\black.jpg"));
    lab2->setScaledContents(true);

    QLabel *lab3 = new QLabel("LBS",this);
    lab3->move(50,22);
    lab3->resize(25,21);
    lab3->setStyleSheet("color:black");

    QLabel *lab4 = new QLabel("标签",this);
    lab4->move(123,218);
    lab4->resize(16,20);
    lab4->setPixmap(QPixmap("D:\\qq文件\\Pitrue\\pictrue\\zh.jpg"));
    lab4->setScaledContents(true);

    QLabel *lab5 = new QLabel("标签",this);
    lab5->move(123,247);
    lab5->resize(16,20);
    lab5->setPixmap(QPixmap("D:\\qq文件\\Pitrue\\pictrue\\mm.jpg"));
    lab5->setScaledContents(true);
}

MainWindow::~MainWindow()
{
}

相关推荐

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

    QTday4

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

    QTday3

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

    QTDay3

    2024-04-12 03:12:01      31 阅读
  4. 为什么音频的采样率是44.1K不是40K也不是42K

    2024-04-12 03:12:01       21 阅读

最近更新

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

    2024-04-12 03:12:01       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

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

    2024-04-12 03:12:01       87 阅读
  4. Python语言-面向对象

    2024-04-12 03:12:01       96 阅读

热门阅读

  1. vue3从精通到入门22:自定义 Hooks

    2024-04-12 03:12:01       38 阅读
  2. 登录接口设计的优缺点——开发经验(3)

    2024-04-12 03:12:01       38 阅读
  3. 关于搭建elk日志平台

    2024-04-12 03:12:01       43 阅读
  4. 设计模式:命令模式示例

    2024-04-12 03:12:01       40 阅读
  5. [RK3399 Linux] 移植U-Boot 2023.04 & Linux 6.3

    2024-04-12 03:12:01       43 阅读
  6. 《1w实盘and大盘基金预测 day19》

    2024-04-12 03:12:01       39 阅读
  7. React中State管理的4 个关键解决方案

    2024-04-12 03:12:01       43 阅读