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()
{
}
相关推荐
Mikhail_G5 分钟前
Python应用变量与数据类型
大数据·运维·开发语言·python·数据分析
YuTaoShao10 分钟前
Java八股文——集合「List篇」
java·开发语言·list
Bl_a_ck39 分钟前
【JS进阶】ES6 实现继承的方式
开发语言·前端·javascript
愈努力俞幸运1 小时前
c++ 头文件
开发语言·c++
永日456701 小时前
学习日记-day24-6.8
开发语言·学习·php
BillKu1 小时前
Java后端检查空条件查询
java·开发语言
十五年专注C++开发1 小时前
CMake基础:gcc/g++编译选项详解
开发语言·c++·gcc·g++
vortex52 小时前
探索 Shell:选择适合你的命令行利器 bash, zsh, fish, dash, sh...
linux·开发语言·bash·shell·dash
zzc9212 小时前
MATLAB仿真生成无线通信网络拓扑推理数据集
开发语言·网络·数据库·人工智能·python·深度学习·matlab
HUN金克斯2 小时前
C++/C函数
c语言·开发语言·c++