#include "mywidget.h"
#include "ui_mywidget.h"
MyWidget::MyWidget(QWidget *parent)
: QWidget(parent)
, ui(new Ui::MyWidget)
{
ui->setupUi(this);
//接收动图
QMovie *mv = new QMovie(":/pictrue/luori.gif");
ui->loglab->setMovie(mv);
//让动图动起来
mv->start();
//设置用户图标
ui->usenamelab->setPixmap(QPixmap(":/pictrue/name.jpg"));
ui->usenamelab->setScaledContents(true);
//设置密码图标
ui->passwdlab->setPixmap(QPixmap(":/pictrue/passwd.jpg"));
ui->passwdlab->setScaledContents(true);
//设置额外图标
ui->guohuilab->setPixmap(QPixmap(":/pictrue/guohui.png"));
ui->guohuilab->setScaledContents(true);
//设置登录按钮
ui->logButton->setStyleSheet("background-color:rgb(224,154,68);"
"border-radius:10px");
//隐藏边框
this->setWindowFlag(Qt::FramelessWindowHint);
//设置行编辑器 占位 透明度
ui->usernameEdit->setPlaceholderText("QQ号/手机/邮箱");
ui->usernameEdit->setStyleSheet("background-color:rgba(224,255,255,0.2);border:none");
ui->passwdEdit->setPlaceholderText("密码");
ui->passwdEdit->setStyleSheet("background-color:rgba(255,255,255,0.2);border:none");
//设置窗口图标和名字
this->setWindowTitle("心中有党,成绩理想");
this->setWindowIcon(QIcon(":/pictrue/luobo.jpg"));
}
MyWidget::~MyWidget()
{
delete ui;
}