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()
{
}
相关推荐
xhbh66617 小时前
MySQL数据导出避坑指南:如何选择正确的工具并设计安全的备份策略?
数据库·mysql·oracle·程序员·mysql导出数据库
幻奏岚音17 小时前
《数据库系统概论》第一章 初识数据库
数据库·算法·oracle
蜗牛~turbo17 小时前
金蝶云星空 调价表取历史价格
java·数据库·sql·c#·database
jc062017 小时前
4.1-中间件之Redis
数据库·redis·中间件
Elastic 中国社区官方博客17 小时前
介绍 Python Elasticsearch Client 的 ES|QL 查询构建器
大数据·开发语言·数据库·python·elasticsearch·搜索引擎·全文检索
TG_yunshuguoji18 小时前
阿里云国际代理:云数据库RDS及上云方案
服务器·数据库·阿里云·云计算
FOLLOW ME31118 小时前
MySQL集群高可用架构
数据库·mysql·架构
TG_yunshuguoji18 小时前
阿里云国际代理:稳定、高效、便捷的数据库服务-云数据库RDS
运维·服务器·数据库·阿里云·云计算
danns88818 小时前
neo4j数据库创建范例(SQL文)
数据库·sql·neo4j
不爱洗脚的小滕19 小时前
【Redis】Scan 命令使用教程:高效遍历海量数据
数据库·redis·bootstrap