Qt 6.13

作业:

复制代码
#include "mywidget.h"

mywidget::mywidget(QWidget *parent)
    : QWidget(parent)
{
    this->setStyleSheet("background-color:white");
    this->resize(600,600);
    this->setWindowFlag(Qt::FramelessWindowHint);
    this->setWindowTitle("华清远见登录");



//    QLabel *lab1=new QLabel(this);
//    lab1->resize(95,55);
//    lab1->setStyleSheet("background-color:green");
//    lab1->setPixmap(QPixmap("C:\\Users\\ASUS\\Desktop\\微信图片_20240613194429.png"));

    QLabel *lab2=new QLabel(this);
    //lab2->move(100,100);
    lab2->resize(600,200);
   lab2->setStyleSheet("background-color:green");
    lab2->setPixmap(QPixmap("E:\\1.QQ\\1774024653\\FileRecv\\pictrue\\logo.png"));


//   QMovie *mov=new QMovie("‪‪C:\\Users\\ASUS\\Desktop\\zz.gif");
//    lab2->setMovie(mov);
//    mov->start();

   lab2->setScaledContents(true);

   QLineEdit *edit1=new QLineEdit(this);  //设置行编辑
   edit1->move(150,350);
   edit1->resize(300,30);
   edit1->setPlaceholderText("请输入账号名/注册");
   edit1->setEchoMode(QLineEdit::Normal);
   QLineEdit *edit2=new QLineEdit(this);
   edit2->move(150,390);
   edit2->resize(300,30);
   edit2->setPlaceholderText("密码");
    edit2->setEchoMode(QLineEdit::Password);

    QLabel *la1=new QLabel(this);
    la1->resize(30,30);
    la1->move(120,350);
    //la1->setStyleSheet("background-color:green");
    la1->setPixmap(QPixmap("‪E:\\1.QQ\\1774024653\\FileRecv\\pictrue\\login.png"));
    la1->setScaledContents(1);

    QPushButton *btn1=new QPushButton("登录",this);
    btn1->move(350,440);
    btn1->resize(100,30);
    btn1->setStyleSheet("background-color:pink");
    QPushButton *btn2=new QPushButton("取消",this);
    btn2->move(150,440);
    btn2->resize(100,30);
    btn2->setStyleSheet("background-color:yellow");



}

mywidget::~mywidget()
{
}
相关推荐
数据知道7 分钟前
PostgreSQL 核心原理:系统内部的对象寻址机制(OID 对象标识符)
数据库·postgresql
薛定谔的猫喵喵11 分钟前
基于PyQt5的视频答题竞赛系统设计与实现
开发语言·qt·音视频
倔强的石头_37 分钟前
关系数据库替换用金仓:数据迁移过程中的完整性与一致性风险
数据库
Elastic 中国社区官方博客43 分钟前
使用 Groq 与 Elasticsearch 进行智能查询
大数据·数据库·人工智能·elasticsearch·搜索引擎·ai·全文检索
穿过锁扣的风1 小时前
一文搞懂 SQL 五大分类:DQL/DML/DDL/DCL/TCL
数据库·microsoft·oracle
l1t1 小时前
DeepSeek总结的SNKV — 无查询处理器的 SQLite 键值存储
数据库·sqlite·kvstore
洛豳枭薰1 小时前
MySQL 梳理
数据库·mysql
薛定谔的猫喵喵1 小时前
基于C++ Qt的唐代诗歌查询系统设计与实现
c++·qt·sqlite
九.九1 小时前
CANN 算子生态的底层安全与驱动依赖:固件校验与算子安全边界的强化
大数据·数据库·安全
蓝帆傲亦1 小时前
代码革命!我用Claude Code 3个月完成1年工作量,这些实战经验全给你
jvm·数据库·oracle