You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
828 B

#include "login.h"
#include "ui_login.h"
login::login(QWidget *parent) :
QWidget(parent),
ui(new Ui::login)
{
ui->setupUi(this);
setAttribute(Qt::WA_TranslucentBackground);
// setStyleSheet("background-color:{rgba:0,0,0,0}");
// setWindowOpacity(0.5);
setWindowFlag(Qt::FramelessWindowHint);
t = new QTimer();
s = 0;
ui->progressBar->setValue(0);
ui->progressBar->setAlignment(Qt::AlignVCenter);
connect(t,SIGNAL(timeout()),this,SLOT(slotTimeout()));
t->start(1000);
}
login::~login()
{
delete ui;
delete w;
}
void login::slotTimeout()
{
s+=1;
if(s<6)
ui->progressBar->setValue(s*20);
else{
t->stop();
delete t;
close();
emit(signalReady());
// w = new MainWindow();
// w->show();
}
}