Qt进度条实例
QProgressDialog progress("doing things......","cancel", 0, finalNum, this);
progress.setWindowModality(Qt::WindowModal);
for(int i = 0; i < finalNum; i++)
{
progress.setValue(i);
if(progress.wasCanceled())
{
break;
}
//do things
}
progress.setValue(finalNum);
网友评论