QT day1

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

Widget::Widget(QWidget *parent)
    : QWidget(parent)
{
    this->setWindowTitle("QQ");
    this->setWindowIcon(QIcon("C:\\Users\\zr\\Desktop\\QT\\pictrue\\qq.png"));
    this->resize(540,410);
    this->setStyleSheet("background-color:white");
    this->setWindowFlag(Qt::FramelessWindowHint);


    QLabel *lab1 =new QLabel(this);
    lab1->resize(540,190);
    QMovie *mv = new QMovie("C:\\Users\\zr\\Desktop\\QT\\pictrue\\qq.gif");
    mv->setParent(this);
    lab1->setMovie(mv);
    mv->start();
    lab1->setScaledContents(true);

    QLabel *lab2 = new QLabel(this);
    lab2->move(120,220);
    lab2->resize(30,30);
    lab2->setPixmap(QPixmap("C:\\Users\\zr\\Desktop\\QT\\pictrue\\wodepeizhenshi.png"));
    lab2->setScaledContents(true);

    QLabel *lab3 = new QLabel(this);
    lab3->move(120,270);
    lab3->resize(30,30);
    lab3->setPixmap(QPixmap("C:\\Users\\zr\\Desktop\\QT\\pictrue\\passwd.jpg"));
    lab3->setScaledContents(true);




    QLineEdit *edit1 = new QLineEdit(this);
    edit1->move(155,220);
    edit1->resize(250,30);
    edit1->setPlaceholderText("账号/密码/电话");

    QLineEdit *edit2 = new QLineEdit(this);
    edit2->move(155,270);
    edit2->resize(250,30);
    edit2->setPlaceholderText("密码");
    edit2->setEchoMode(QLineEdit::Password);



    QPushButton *btn1 = new QPushButton("登录",this);
    btn1->resize(150,50);
    btn1->move(180,330);
    btn1->setStyleSheet("background-color:rgb(60,120,120);color:rgb(255,255,255);border-radius:10px");

}

Widget::~Widget()
{
}
相关推荐
青岑CTF37 分钟前
攻防世界-Ics-05-胎教版wp
开发语言·安全·web安全·网络安全·php
Li emily39 分钟前
如何通过外汇API平台快速实现实时数据接入?
开发语言·python·api·fastapi·美股
APIshop1 小时前
Java 实战:调用 item_search_tmall 按关键词搜索天猫商品
java·开发语言·数据库
血小板要健康1 小时前
Java基础常见面试题复习合集1
java·开发语言·经验分享·笔记·面试·学习方法
淼淼7632 小时前
安装jdk1.8
java·开发语言
PfCoder2 小时前
WinForm真入门(23)---PictureBox 控件详细用法
开发语言·windows·c#·winform
Legendary_0082 小时前
Type-C 一拖二快充线:突破单口限制的技术逻辑
c语言·开发语言
过期动态2 小时前
Java开发中的@EnableWebMvc注解和WebMvcConfigurer接口
java·开发语言·spring boot·spring·tomcat·maven·idea
csbysj20202 小时前
Web 标准
开发语言
老姚---老姚3 小时前
在windows下编译go语言编写的dll库
开发语言·windows·golang