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()
{
}
相关推荐
昌原的儿子LEO1 小时前
Linux IO多路复用与SQLite数据库核心知识点总结
linux·数据库·oracle
山岚的运维笔记2 小时前
mysql 专业笔记 -- 第 8 章:使用变量
运维·数据库·笔记·后端·学习·mysql·dba
CHPCWWHSU2 小时前
DeepSeek-Harness-Qt将浏览器端Agent装入桌面应用
开发语言·qt
聚美智数2 小时前
网安查询-备案查询-网络安全查询API接口介绍
网络·数据库·web安全
坐吃山猪2 小时前
【多线程】Semaphore使用
java·数据库·oracle·多线程
数智启示录2 小时前
PostgreSQL 内存调优实战(第 12 篇):work_mem 只调大 64 倍,峰值为什么远不止 64 倍
运维·数据库·经验分享·postgresql·面试
姜太小白3 小时前
【Oracle】记排查sh脚本调用SQL执行卡顿的排查总结
数据库·sql·oracle
bgy66663 小时前
MariaDB 数据库 基础详解
数据库·mariadb
自动化监测Learner3 小时前
QGIS 把geojson数据导入 PostgreSQL/PostGIS 的完整流程
数据库·postgresql
虎虎(_ _)。゜zzZ4 小时前
Qdrant向量数据库工程实战
数据库·人工智能·大模型·向量数据库·rag·qdrant