2024.9.28 作业+思维导图

widget.cpp

#include "widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
{
    this->setFixedSize(320,448);
    this->setWindowFlag(Qt::FramelessWindowHint);

    //QPushButton
    QPushButton *PushButton1 = new QPushButton("登录",this);
    PushButton1->move(30,320);
    PushButton1->setFixedSize(261,41);

    QPushButton *PushButton2 = new QPushButton("扫码登录",this);
    PushButton2->move(90,400);
    PushButton2->setFixedSize(61,20);

    QPushButton *PushButton3 = new QPushButton("更多选项",this);
    PushButton3->move(170,400);
    PushButton3->setFixedSize(61,21);

    QPushButton *PushButton4 = new QPushButton("/",this);
    PushButton4->move(260,0);
    PushButton4->setFixedSize(31,31);

    QPushButton *PushButton5 = new QPushButton("x",this);
    PushButton5->move(290,0);
    PushButton5->setFixedSize(31,31);

    //LineEdit
    QLineEdit *LineEdit1 = new QLineEdit(this);
    LineEdit1->setPlaceholderText("输入QQ号");
    LineEdit1->move(30,170);
    LineEdit1->setFixedSize(261,41);

    QLineEdit *LineEdit2 = new QLineEdit(this);
    LineEdit2->setPlaceholderText("输入QQ密码");
    LineEdit2->move(30,220);
    LineEdit2->setFixedSize(261,41);

    //QLabel
    QLabel *QLable1 = new QLabel(this);
    //QLable1->setText("LOGO");
    QLable1->move(120,60);
    QLable1->setFixedSize(81,81);
    QLable1->setStyleSheet("background-color:skyblue");
    //QComboBox
    QComboBox *QComboBox1 = new QComboBox(this);
    QComboBox1->move(250,170);
    QComboBox1->setFixedSize(41,41);
    //QRadioButton
    QRadioButton *RadioButton1 = new QRadioButton(this);
    RadioButton1->setText("已阅读并同意服务协议和QQ隐私保护指引");
    RadioButton1->move(40,280);
    RadioButton1->setFixedSize(241,18);
}

Widget::~Widget()
{
}

widget.h

#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QComboBox>
#include <QGraphicsView>
#include <QRadioButton>
#include <QMouseEvent>

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
};
#endif // WIDGET_H

效果图

思维导图

 做一半手贱删了还没保存,先欠着

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值