QT中进度条动画的问题

发布于 2024-08-22 22:07:23 字数 325 浏览 3 评论 0原文

我在QT中做了进度条,我在模拟器和移动设备中都使用了.. 出现无限进度条,但它没有动画..(无限进度不会到来)

这是我编写的代码,

QApplication a(argc, argv);

QProgressDialog *dialog = new QProgressDialog();

dialog->setMinimum(0);
dialog->setMaximum(0);

dialog->showMaximized(); 
dialog->exec();   
return a.exec();

如果有问题请提出建议

i did progress bar in QT, i used both in emulator and mobile..
the infinite progress bar in appearing but its not getting animated.. (infinite progress is not coming)

here is the code which i hv written

QApplication a(argc, argv);

QProgressDialog *dialog = new QProgressDialog();

dialog->setMinimum(0);
dialog->setMaximum(0);

dialog->showMaximized(); 
dialog->exec();   
return a.exec();

pls suggest if some thing wrong

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡淡的优雅 2024-08-29 22:07:23

我在一个带有 QTCreator 和 Qt 4.6.1 的空白项目上尝试了这个,它起作用了......

也许你可以尝试添加这一行:qApp->processEvents();

希望它能有点帮助!

编辑:如果您尝试删除该行dialog->exec();我认为没有必要...

I tried this on a blank project with QTCreator and Qt 4.6.1 and it worked...

Maybe you could try to add this line : qApp->processEvents();

Hope it helps a bit!

Edit : And if you try to remove the line dialog->exec(); I don't think it's necessary...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文