QT

#include "mywidget.h"

MyWidget::MyWidget(QWidget *parent)
    : QMainWindow(parent)
{
    this->setWindowTitle("MARS TECHNOLOGY"); //设置窗口名称
    this->setWindowIcon(QIcon("C:\\Users\\PC\\Desktop\\图片\\2.jpg"));//设置标题图标
    //this->setStyleSheet("background-color:blue");//设置窗口背景色
    this->resize(1600,1200);//重设窗口大小
    this->setFixedSize(1600,1200);//固定窗口大小
   // this->setWindowFlag(Qt::FramelessWindowHint);

    QLabel* lab1 = new QLabel(this);
    lab1->resize(1600,1200);
    lab1->setPixmap(QPixmap("C:\\Users\\PC\\Desktop\\图片\\3.jpg"));
    lab1->setScaledContents(true);

//    QLabel* lab2 = new QLabel(this);
//    lab2->resize(450,50);
//    lab2->move(550,550);
//    lab2->setStyleSheet("background-color:rgba(150,150,150,0.5)");

//    QLabel* lab3 = new QLabel(this);
//    lab3->resize(450,50);
//    lab3->move(550,650);
//    lab3->setStyleSheet("background-color:rgba(150,150,150,0.5)");

    QLabel* lab4 = new QLabel(this);
    lab4->resize(1000,100);
    lab4->move(350,200);

    lab4->setText("MARS  TECHNOLOGY");
    lab4->setStyleSheet("QLabel { color: white; font-size: 30pt; font-family: Arial;font-weight: bold;background-color:rgba(150,150,150,0.05) }");

    QPushButton *btn1 = new QPushButton("登录",this);
    btn1->move(550, 700);
    btn1->resize(450,45);
    btn1->setStyleSheet("background-color:rgb(50,103,163);color:white;border-radius:5px");

    QLineEdit* edit1 = new QLineEdit(this);
    edit1->move(550,450);
    edit1->resize(450,50);
    edit1->setPlaceholderText("手机\\邮箱");


    QLineEdit* edit2 = new QLineEdit(this);
    edit2->move(550,550);
    edit2->resize(450,50);

    edit2->setPlaceholderText("密码");
    edit2->setEchoMode(QLineEdit::Password);


}

MyWidget::~MyWidget()
{
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值