QT中进度条动画的问题
我在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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在一个带有 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...