当前位置:网站首页>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();
边栏推荐
- [daily question in summer] Luogu p7222 [rc-04] informatics competition
- And search: the suspects (find the number of people related to the nth person)
- Variable binding and deconstruction for rudimentary rust
- Pico Neo3手柄抓取物体
- AcWing 887. Finding combinatorial number III (Lucas theorem)
- Copy baby prompt: material cannot be empty. How to solve it?
- Go learning notes (5) basic types and declarations (4)
- How to start learning editing? Detailed analysis of zero basis
- JS random verification code
- Thread process foundation of JUC
猜你喜欢

Explanation of characteristics of hydraulic slip ring

Application of industrial conductive slip ring

Practice of combining rook CEPH and rainbow, a cloud native storage solution

LevelDB源码分析之LRU Cache

Mathematical knowledge: finding the number of divisors

Copy baby prompt: material cannot be empty. How to solve it?

Go learning notes (5) basic types and declarations (4)

Causes of short circuit of conductive slip ring and Countermeasures

Distributed transactions - Solutions

轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷
随机推荐
JS random verification code
FileInputStream
How to start learning editing? Detailed analysis of zero basis
Usage and principle of synchronized
Global and Chinese market of digital badge 2022-2028: Research Report on technology, participants, trends, market size and share
0xc000007b应用程序无法正常启动解决方案(亲测有效)
Implementation of distributed lock
[summer daily question] Luogu p5886 Hello, 2020!
Global and Chinese markets of gps/gnss receiver modules 2022-2028: Research Report on technology, participants, trends, market size and share
How to meet the requirements of source code confidentiality and source code security management
Memtable for leveldb source code analysis
Thread safety issues
tar命令
El cascade echo failed; El cascader does not echo
Daily question -leetcode1175- permutation of prime numbers - Mathematics
Flutter 实现每次进来界面都刷新数据
QT等待框制作
LeetCode316-去除重复字母-栈-贪心-字符串
Causes of short circuit of conductive slip ring and Countermeasures
Receiving package install and uninstall events