当前位置:网站首页>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();
边栏推荐
- Global and Chinese market of search engine optimization (SEO) software 2022-2028: Research Report on technology, participants, trends, market size and share
- Design and application of immutable classes
- Rainbond结合NeuVector实践容器安全管理
- Fluentd is easy to use. Combined with the rainbow plug-in market, log collection is faster
- el-cascader回显失败;el-cascader回显不出来
- [summer daily question] Luogu p5886 Hello, 2020!
- [Yugong series] February 2022 Net architecture class 005 ABP vNext Net core web application getting started configuration
- Simple read / write verification of qdatastream
- Intelligent operation and maintenance: visual management system based on BIM Technology
- Several methods of creating thread classes
猜你喜欢
C WPF uses dockpanel to realize screenshot box
Programmers dig "holes" to get rich: if they find a loophole, they will be rewarded 12.72 million yuan
Redis数据库的部署及常用命令
Numeric amount plus comma; JS two methods of adding three digits and a comma to numbers; JS data formatting
複制寶貝提示材質不能為空,如何解决?
Ebpf cilium practice (2) - underlying network observability
Explanation of characteristics of hydraulic slip ring
Summary of spanner's paper
Data consistency between redis and database
el-cascader回显失败;el-cascader回显不出来
随机推荐
Daily question -leetcode1175- permutation of prime numbers - Mathematics
[daily question in summer] function of rogu p3742 UMI
Global and Chinese market of digital badge 2022-2028: Research Report on technology, participants, trends, market size and share
Tcp/ip explanation (version 2) notes / 3 link layer / 3.2 Ethernet and IEEE 802 lan/man standards
CockroachDB 分布式事务源码分析之 TxnCoordSender
Application of industrial conductive slip ring
JS random verification code
Distributed architecture system splitting principles, requirements and microservice splitting steps
复制宝贝提示材质不能为空,如何解决?
Cockroachdb: the resistant geo distributed SQL database paper reading notes
Data consistency between redis and database
Global and Chinese market of protection circuit modules 2022-2028: Research Report on technology, participants, trends, market size and share
第05天-文件操作函数
3D建模與處理軟件簡介 劉利剛 中國科技大學
Software intelligence: the "world" and "boundary" of AI sentient beings in AAAs system
AcWing 884. Gauss elimination for solving XOR linear equations
Flutter 实现每次进来界面都刷新数据
Global and Chinese market for instant messaging security and compliance solutions 2022-2028: Research Report on technology, participants, trends, market size and share
LeetCode522-最长特殊序列II-哈希表-字符串-双指针
Copy baby prompt: material cannot be empty. How to solve it?