修改 web控件

This commit is contained in:
Maicss
2020-08-26 09:26:59 +08:00
parent 18c3965742
commit 4e4f55995e
9 changed files with 209 additions and 352 deletions

21
progressload.cpp Normal file
View File

@@ -0,0 +1,21 @@
#include "progressload.h"
ProgressLoad::ProgressLoad(QWidget *parent) : QWidget(parent)
{
m_progess=new QWidget;
m_progess->setStyleSheet("background-color:#999999");
m_progess->move(0,0);
timer=new QTimer;
value=0;
timer->setInterval(100);
timer->start();
connect(timer,&QTimer::timeout,[=](){
m_progess->setFixedWidth(width()/100*value);
});
}
void ProgressLoad::setValue(int v)
{
value=v;
m_progess->setFixedWidth(width()/100*value);
}