问题在QT进度动画 [英] Problem in animation of progressbar in QT

查看:377
本文介绍了问题在QT进度动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有进度条在QT,我无论是在仿真器和移动使用..
在出现的无限进度条,但其没有得到动画..(无限进度不来了)

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)

这里是code这是我写的HV

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

推荐答案

我想这与QTCreator和Qt 4.6.1空白的项目和它的工作...

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

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

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

希望它帮助一点!

编辑:如果你试图删除行对话框 - > EXEC();我不认为这是必要的......

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

这篇关于问题在QT进度动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆