当前位置:网站首页>QT waiting box production
QT waiting box production
2022-07-01 05:21:00 【rainbow_ lucky0106】
QMovie + GIF
#include "DWaitProcessDlg.h"
DWaitProcessDlg::DWaitProcessDlg(const QString &title, QWidget *parent) : QDialog(parent)
{
this->setFixedSize(100, 100);
this->setWindowOpacity(0.8);
this->setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog);
this->setAttribute(Qt::WA_TranslucentBackground, true);
m_frameBg = new QFrame(this);
m_frameBg->setStyleSheet("background-color: rgb(55, 135,215); border-radius:10px;");
m_frameBg->setGeometry(0, 0, 100, 100);
m_labelLogo = new QLabel(m_frameBg);
m_labelLogo->setStyleSheet("background-color:transparent;");
m_labelLogo->setGeometry(30, 15, 40, 40);
m_movieLogo = new QMovie(":/Resource/images/spinner.svg");
m_labelLogo->setScaledContents(true);
m_labelLogo->setMovie(m_movieLogo);
m_labelTip = new QLabel(m_frameBg);
m_labelTip->setText(title);
m_labelTip->setStyleSheet("color: white;background-color: transparent;");
m_labelTip->setGeometry(10, 70, 80, 20);
m_movieLogo->start();
}
DWaitProcessDlg::~DWaitProcessDlg()
{
m_movieLogo->stop();
delete m_labelLogo;
delete m_movieLogo;
delete m_labelLogo;
delete m_frameBg;
}
Call mode
QApplication::setOverrideCursor(Qt::WaitCursor);// Set the mouse to wait
QString strTip = " Export data in ...";
DWaitProcessDlg *pWaitDlg = new DWaitProcessDlg(strTip, this);
pWaitDlg->show();
for(int i=0; i<list.count(); i++)
{
QCoreApplication::processEvents();
}
QApplication::restoreOverrideCursor();
pWaitDlg->close();
边栏推荐
- More than one file was found with OS independent path ‘lib/armeabi-v7a/libyuv.so‘.
- Query long transaction
- Global and Chinese markets of InGaAs APD arrays 2022-2028: Research Report on technology, participants, trends, market size and share
- Lock free concurrency of JUC (leguan lock)
- Application and principle of ThreadPoolExecutor thread pool
- 提高企业产品交付效率系列(1)—— 企业应用一键安装和升级
- Thread process foundation of JUC
- Variable binding and deconstruction for rudimentary rust
- 每日一题-LeetCode1175-质数排列-数学
- Rust hello-word
猜你喜欢

LeetCode1497-检查数组对是否可以被 k 整除-数组-哈希表-计数

Spanner 论文小结

Cockroachdb: the resistant geo distributed SQL database paper reading notes

Use of STM32 expansion board temperature sensor and temperature humidity sensor

Precautions for use of conductive slip ring

LeetCode316-去除重复字母-栈-贪心-字符串

eBPF Cilium实战(2) - 底层网络可观测性

0xc000007b应用程序无法正常启动解决方案(亲测有效)

el-cascader回显失败;el-cascader回显不出来

实战:redux的基本使用
随机推荐
Global and Chinese market of digital badge 2022-2028: Research Report on technology, participants, trends, market size and share
Introduction to 3D modeling and processing software Liu Ligang University of science and technology of China
Solution: thread 1:[< *> setvalue:forundefined key]: this class is not key value coding compliant for the key*
Design and application of immutable classes
[daily question in summer] Luogu p2026 find the analytic formula of primary function
Cockroachdb: the resistant geo distributed SQL database paper reading notes
How to meet the requirements of source code confidentiality and source code security management
0xc000007b应用程序无法正常启动解决方案(亲测有效)
JS random verification code
Use and principle of reentrantlock
Global and Chinese market of metal oxide semiconductor field effect transistors 2022-2028: Research Report on technology, participants, trends, market size and share
Dynamic verification of new form items in El form; El form verifies that the dynamic form V-IF does not take effect;
Use and principle of AQS related implementation classes
[daily question in summer] first time, second time, deal!
AcWing 887. Finding combinatorial number III (Lucas theorem)
How to traverse massive data in redis
Query long transaction
如何创建一个根据进度改变颜色的进度条
[NLP Li Hongyi] notes
Implementation of distributed lock