#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;
}