#include "widget.h"
#include "ui_widget.h"
Widget::Widget(QWidget *parent)
: QWidget(parent)
, ui(new Ui::Widget)
{
ui->setupUi(this);
this->setWindowFlag(Qt::FramelessWindowHint);
this->setAttribute(Qt::WA_TranslucentBackground);
}
Widget::~Widget()
{
delete ui;
}
void Widget::on_niu2_clicked()
{
this->close();
}
void Widget::on_niu3_clicked()
{
ui->frame_2->resize(100,200);
}
void Widget::on_niu4_clicked()
{
ui->frame->resize(500,600);
}
void Widget::on_pushButton_clicked()
{
if(ui->lineEdit->text()=="12345" && ui->lineEdit_2->text()=="abcd")
{
this->close();
emit my_jump();
}
else
{
ui->lineEdit->clear();
ui->lineEdit_2->clear();
}
}
*{
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(55, 184, 236, 255), stop:1 rgba(255, 255, 255, 255));
background-color: rgb(255, 255, 255);
}
QFrame#frame{
/* border-radius:30px;*/
border-image:url(:/tu-pian/hai.jpg);
}
#frame_2{
border-radius:30px;
background-color: rgba(210, 210, 210, 120);
background:transparent;
}
QLabel#label{
border-radius:30px;
background-color: rgba(201, 201, 201, 120);
}
#label_2{
background:transparent; /*完全透明*/
color: rgba(0, 0, 84, 120);
}
QLineEdit{
background:transparent; /*完全透明*/
border:none;
border-bottom:1px solid rgba(240, 240, 240, 120);
color: rgba(250, 250, 250, 120);
font: 11pt "等线";
}
QPushButton#pushButton{
color: rgba(125, 125, 125, 120);
font: 14pt "等线";
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(0, 174, 214, 255), stop:1 rgba(255, 255, 255, 255));
border-radius:5px;
}
QPushButton:hover{
color: rgba(125, 125, 125, 120);
font: 14pt "等线";
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(30, 174, 214, 255), stop:1 rgba(255, 255, 255, 255));
border-radius:5px;
}
QPushButton:pressed{
color: rgba(125, 125, 125, 120);
font: 14pt "等线";
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(0, 174, 214, 255), stop:1 rgba(255, 255, 255, 255));
border-radius:5px;
padding-top:5px;
padding-left:5px;
}
#niu2,#niu3,#niu4{
background:transparent;
}