QT_day1

cpp 复制代码
#include "mywidget.h"

MyWidget::MyWidget(QWidget *parent)
    : QWidget(parent)
{
    //窗口大小
    this->resize(851,648);
    this->setFixedSize(851,648);
    //窗口背景色
    this->setStyleSheet("background:rgb(255,255,255,)");
    //窗口名称
    this->setWindowTitle("TIM");
    //窗口图标
    this->setWindowIcon(QIcon("C:\\Users\\翁俊彦\\Desktop\\test_qq\\屏幕截图 2024-06-13 185540.png"));
    //左侧图片
    QLabel *lab1=new QLabel(this);
    lab1->setPixmap(QPixmap("C:\\Users\\翁俊彦\\Desktop\\test_qq\\屏幕截图 2024-06-13 185621.png"));
    //qq登录的lable
    QLabel *lab2=new QLabel(this);
    lab2->move(575,156);
    lab2->setPixmap(QPixmap("C:\\Users\\翁俊彦\\Desktop\\test_qq\\屏幕截图 2024-06-13 185827.png"));
    //微信登录的label
    QLabel *lab3=new QLabel(this);
    lab3->move(690,156);
    lab3->setPixmap(QPixmap("C:\\Users\\翁俊彦\\Desktop\\test_qq\\屏幕截图 2024-06-13 185900.png"));

    //账号输入
    QLineEdit *edit1 = new QLineEdit(this);
    edit1->move(542,300);
    edit1->resize(280,50);
    edit1->setPlaceholderText("QQ号码/手机/邮箱");

    //登录按钮
    QPushButton *btn1 = new QPushButton(this);
    QIcon icon1("C:\\Users\\翁俊彦\\Desktop\\test_qq\\屏幕截图 2024-06-13 192900.png");
    btn1->setIcon(icon1);
    btn1->move(790,435);

    //密码输入
    QLineEdit *edit2 = new QLineEdit(this);
    edit2->move(542,370);
    edit2->resize(280,50);
    edit2->setPlaceholderText("密码");
    edit2->setEchoMode(QLineEdit::Password);

    //找回密码按钮
    QPushButton *btn2 = new QPushButton(this);
    btn2->setText("找回密码");
    btn2->move(750,545);
    btn2->resize(65,22);

    //注册账号按钮
    QPushButton *btn3 = new QPushButton(this);
    btn3->setText("注册账号");
    btn3->move(750,585);
    btn3->resize(65,22);

    //记住密码复选框
    QCheckBox *box1 = new QCheckBox(this);
    box1->setText("记住密码");
    box1->resize(85,22);
    box1->move(555,545);

    //自动登录复选框
    QCheckBox *box2 = new QCheckBox(this);
    box2->setText("自动登录");
    box2->resize(85,22);
    box2->move(555,585);


}

MyWidget::~MyWidget()
{
}
相关推荐
酒尘&2 小时前
JS数组不止Array!索引集合类全面解析
开发语言·前端·javascript·学习·js
冬夜戏雪2 小时前
【java学习日记】【2025.12.7】【7/60】
java·开发语言·学习
xwill*2 小时前
分词器(Tokenizer)-sentencepiece(把训练语料中的字符自动组合成一个最优的子词(subword)集合。)
开发语言·pytorch·python
咖啡の猫3 小时前
Python列表的查询操作
开发语言·python
quikai19813 小时前
python练习第三组
开发语言·python
JIngJaneIL3 小时前
基于Java非遗传承文化管理系统(源码+数据库+文档)
java·开发语言·数据库·vue.js·spring boot
吃西瓜的年年4 小时前
1. 初识C语言
c语言·开发语言
CHANG_THE_WORLD4 小时前
Python 字符串全面解析
开发语言·python
不会c嘎嘎4 小时前
深入理解 C++ 异常机制:从原理到工程实践
开发语言·c++
永远都不秃头的程序员(互关)5 小时前
C语言 基本语法
c语言·开发语言