That might work, but when using progress.exec() it won't launch the script until the progress-dialog has finished (or has been canceled by user). Only way to get the script to be executed while dialog is open is to use progress.show() and then launch the script, but then I won't see the progressbar, but that's not a big deal anymore since the script runs pretty fast and notifications are informing the user that something is happening.
QProgressDialog *myProgressDialog;
myProgressDialog = new QProgressDialog(this);
myProgressDialog->show();
myProgressDialog->hide();
myProgressDialog->setAttribute(Qt::WA_Maemo5ShowProgressIndicator, true);