当前位置:网站首页>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();
边栏推荐
- Redis数据库的部署及常用命令
- Using nocalhost to develop microservice application on rainbow
- How to hide browser network IP address and modify IP internet access?
- el-cascader回显失败;el-cascader回显不出来
- Global and Chinese market of 3D CAD 2022-2028: Research Report on technology, participants, trends, market size and share
- Memtable for leveldb source code analysis
- 积分商城游戏能够给商家带来什么?怎么搭建积分商城?
- 如何选择导电滑环材料
- 智慧运维:基于 BIM 技术的可视化管理系统
- 点赞的云函数
猜你喜欢
El cascade echo failed; El cascader does not echo
el-form表单新增表单项动态校验;el-form校验动态表单v-if不生效;
How to select conductive slip ring material
Use and principle of wait notify
Redis数据库的部署及常用命令
Tcp/ip explanation (version 2) notes / 3 link layer / 3.2 Ethernet and IEEE 802 lan/man standards
如何创建一个根据进度改变颜色的进度条
C# wpf 使用DockPanel实现截屏框
每日一题-LeetCode1175-质数排列-数学
Copy baby prompt: material cannot be empty. How to solve it?
随机推荐
LeetCode316-去除重复字母-栈-贪心-字符串
Vérification simple de la lecture et de l'écriture de qdatastream
提高企业产品交付效率系列(1)—— 企业应用一键安装和升级
如何创建一个根据进度改变颜色的进度条
Txncoordsender of cockroachdb distributed transaction source code analysis
【暑期每日一題】洛穀 P1568 賽跑
点赞的云函数
Variable binding and deconstruction for rudimentary rust
Global and Chinese market of enterprise wireless LAN 2022-2028: Research Report on technology, participants, trends, market size and share
Single page application
Numeric amount plus comma; JS two methods of adding three digits and a comma to numbers; JS data formatting
Global and Chinese markets of gps/gnss receiver modules 2022-2028: Research Report on technology, participants, trends, market size and share
eBPF Cilium实战(2) - 底层网络可观测性
Global and Chinese market of broadband amplifiers 2022-2028: Research Report on technology, participants, trends, market size and share
Pico neo3 handle grabs objects
Global and Chinese market of protection circuit modules 2022-2028: Research Report on technology, participants, trends, market size and share
Summary of spanner's paper
El cascade echo failed; El cascader does not echo
Redis数据库的部署及常用命令
Print stream and system setout();