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()
{
}
相关推荐
序属秋秋秋43 分钟前
《C++初阶之内存管理》【内存分布 + operator new/delete + 定位new】
开发语言·c++·笔记·学习
ruan1145142 小时前
MySQL4种隔离级别
java·开发语言·mysql
quant_19863 小时前
R语言如何接入实时行情接口
开发语言·经验分享·笔记·python·websocket·金融·r语言
百锦再7 小时前
详细解析 .NET 依赖注入的三种生命周期模式
java·开发语言·.net·di·注入·模式·依赖
风吹落叶花飘荡7 小时前
2025 Next.js项目提前编译并在服务器
服务器·开发语言·javascript
失败又激情的man8 小时前
python之requests库解析
开发语言·爬虫·python
专注VB编程开发20年8 小时前
常见 HTTP 方法的成功状态码200,204,202,201
开发语言·网络协议·tcp/ip·http
有没有没有重复的名字8 小时前
线程安全的单例模式与读者写者问题
java·开发语言·单例模式
十秒耿直拆包选手8 小时前
Qt:主窗体(QMainwindow)初始化注意事项
c++·qt
开开心心_Every9 小时前
便捷的电脑自动关机辅助工具
开发语言·人工智能·pdf·c#·电脑·音视频·sublime text