10.16QT作业

#include "widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
{
    //设置窗口
    this->resize(428,330);
    this->setWindowFlag(Qt::FramelessWindowHint);
    //设置标签
    QLabel *lab1 = new QLabel;
    lab1->setParent(this);
    lab1->resize(428,127);
    lab1->setStyleSheet("background-color:green");

    QLabel *lab2 = new QLabel;
    lab2->setParent(this);
    lab2->move(17,19);
    lab2->resize(23,32);
    lab2->setScaledContents(true);
    lab2->setPixmap(QPixmap("D:\\QT\\OIP-C.png"));

    QLabel *lab3 = new QLabel;
    lab3->setParent(this);
    lab3->move(41,18);
    lab3->resize(37,22);
    lab2->setPixmap(QPixmap("D:\\QT\\QT_sucaih1\\qq1.png"));
    lab3->setScaledContents(true);

    QLabel *lab4 = new QLabel;
    lab4->setParent(this);
    lab4->move(192,80);
    lab4->resize(70,70);
    lab4->setPixmap(QPixmap("D:\\QT\\QT_sucaih1\\153744-fcdlum43rt.webp"));

    QLabel *lab5 = new QLabel;
    lab5->setParent(this);
    lab5->move(120,176);
    lab5->resize(15,16);
    lab5->setPixmap(QPixmap("D:\\QT\\QT_sucaih1\\qq1.png"));
    lab5->setScaledContents(true);

    QLabel *lab6 = new QLabel;
    lab6->setParent(this);
    lab6->move(120,209);
    lab6->resize(17,18);
    lab6->setPixmap(QPixmap("D:\\QT\\QT_sucaih1\\OIP-C.jpg"));
    lab6->setScaledContents(true);

    //设置行编辑
    QLineEdit *ed1=new QLineEdit;
    ed1->setParent(this);
    ed1->move(150,175);
    ed1->setPlaceholderText("qq号码/手机/邮箱");


    QLineEdit *ed2=new QLineEdit;
    ed2->setParent(this);
    ed2->move(150,209);
    ed1->setPlaceholderText("密码");
    ed2->setEchoMode(QLineEdit::Password);

    //按钮
    QPushButton *btn1 = new QPushButton(this);
    btn1->setText("登录");
    btn1->setStyleSheet("background-color:blue");
    btn1->move(120,277);
    btn1->resize(220,35);

    QPushButton *btn2 = new QPushButton(this);
    btn2->setText("口自动登录");
    btn2->setStyleSheet("background-color:white");
    btn2->move(100,247);
    btn2->resize(70,16);
    btn2->setEnabled(false);

    QPushButton *btn3 = new QPushButton(this);
    btn3->setText("口记住密码");
    btn3->setStyleSheet("background-color:white");
    btn3->move(196,247);
    btn3->resize(70,16);
    btn3->setEnabled(false);

    QPushButton *btn4 = new QPushButton(this);
    btn4->setText("找回密码");
    btn4->setStyleSheet("background-color:white");
    btn4->move(289,247);
    btn4->resize(70,16);
    btn4->setEnabled(false);


}

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值