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()
{
}
相关推荐
LDR00615 小时前
Type-C 快充全面升级!LDR6601 赋能个人护理便携电机,重塑剃须刀 / 理发器新体验
c语言·开发语言
雪碧聊技术15 小时前
Tree.js是什么?一文讲透
开发语言·javascript·ecmascript
码云数智-园园15 小时前
C++20 Modules 模块详解
java·开发语言·spring
swordbob16 小时前
NIO的channel中什么是 fd(File Descriptor,文件描述符)
java·开发语言·nio
源分享16 小时前
Java线程同步的多种实现方法(非常详细)
java·开发语言·jvm
Luminous.16 小时前
C语言--day30
c语言·开发语言
何以解忧,唯有..17 小时前
Go语言循环语句详解:for、range与循环控制
开发语言·算法·golang
謓泽17 小时前
C语言不是语法,是通往机器的地图。
c语言·开发语言
云水一下17 小时前
从零开始学 PHP 系列(一):PHP 的前世今生与开发环境搭建
开发语言·php
飞天狗11117 小时前
零基础JavaWeb入门——第五课第二小节:九大内置对象 · 第2个:response(响应对象)
java·开发语言