I am trying to copy /dev/mem to another location and want a 'busy indicator progressDialog' (in which a fluid moves to and fro in a progress bar) to show that the copying process is going on.

Qt provides two widgets for showing progress
1. QProgressBar
2. QProgressDialog

if we set both setMinimum and setMaximum equal to zero in 'QProgressBar' then i get the to and fro functionality but although setMaximum and setMaximum properties are available for 'QProgressDialog' too; setting them to zero do not give me the required functionality.

I hope i made myself clear. Please suggest some solution..

Following link contains the snippet of the code

Qt Code:
  1. QProgressDialog progress("Copying files...", "Abort Copy", 0, 0);
  2. progress.setWindowModality(Qt::WindowModal);
  3. progress.setMinimumDuration(0);
  4.  
  5. QObject *parent;
  6. QString temp="checking";
  7. QString program = "dd if=/dev/mem of=/home/usman/copiedFile.dt"
  8. QProcess *myProcess= new QProcess(parent);
  9. QCoreApplication::processEvents();
  10.  
  11. progress.setRange(0, 1);
  12. progress.setValue(0);
  13. progress.setRange(0, 0);
To copy to clipboard, switch view to plain text mode