qtday1 作业

#include "widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
{
    this->setFixedSize(600,400);
    this->setWindowOpacity(0.8);
    this->setWindowIcon(QIcon("C:\\Users\\Administrator\\Desktop\\icon\\logo"));
    this->setWindowTitle("聊聊");
    this->setStyleSheet("background-color:pink");
    /***************************************/
    this->lab1 = new QLabel(this);
    lab1->setPixmap(QPixmap("C:\\Users\\Administrator\\Desktop\\icon\\gif"));
    lab1->resize(600,150);
    lab1->setScaledContents(true);
    /*****************************************/
    this->lab2 = new QLabel(this);
    lab2->setPixmap(QPixmap("C:\\Users\\Administrator\\Desktop\\icon\\1"));
    lab2->setScaledContents(true);
    lab2->resize(40,40);
    lab2->move(180,180);
    /*****************************************/
    this->lab3 = new QLabel(this);
    lab3->setPixmap(QPixmap("C:\\Users\\Administrator\\Desktop\\icon\\2"));
    lab3->setScaledContents(true);
    lab3->resize(40,40);
    lab3->move(180,230);
    /***************************************/
    this->line1 = new QLineEdit(this);
    line1->setPlaceholderText("账号");
    line1->resize(200,40);
    line1->move(240,180);
    /******************************************/
    this->line2 = new QLineEdit(this);
    line2->setPlaceholderText("密码");
    line2->setEchoMode(QLineEdit::Password);
    line2->resize(200,40);
    line2->move(240,230);
    /*************************************/
    this->btn1 = new QPushButton(QIcon("C:\\Users\\Administrator\\Desktop\\icon\\login"),\
                                 "登录",this);
    btn1->resize(80,40);
    btn1->move(240,280);
    //btn1->setStyleSheet("border-radius:10px");
    /*************************************/
    this->btn2 = new QPushButton(QIcon("C:\\Users\\Administrator\\Desktop\\icon\\cancel"),\
                                 "取消",this);
    btn2->resize(80,40);
    //btn2->setStyleSheet("border-radius:10px");
    btn2->move(350,280);
}

Widget::~Widget()
{
}


在这里插入图片描述
脑图:
https://www.mubu.com/doc/3HHs3KlOaxz

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值