Abc
6th June 2008, 08:16
Hi,
I am making an external process call in QT and trying to compile a file. I want to show the progress of the process either using a progress dialog or just a message box. In my compile() function where I make the call to the external process, I have written it like
QProgressDialog progressDialog(this);
progressDialog.setCancelButtonText(tr("&Cancel"));
progressDialog.setRange(0, fname.size());
progressDialog.setWindowTitle(tr("Compile"));
progressDialog.show();
for (int i = 0; i < fname.size(); ++i) {
progressDialog.setLabelText(tr("Compiling the current file..."));
progressBar.setValue(i);
}
This works fine in windows i.e. the progress dialog is visible when the compile is in progress but this does not show the progress bar in Linux. Please let me know what the possible error could be and how to rectify.
I am making an external process call in QT and trying to compile a file. I want to show the progress of the process either using a progress dialog or just a message box. In my compile() function where I make the call to the external process, I have written it like
QProgressDialog progressDialog(this);
progressDialog.setCancelButtonText(tr("&Cancel"));
progressDialog.setRange(0, fname.size());
progressDialog.setWindowTitle(tr("Compile"));
progressDialog.show();
for (int i = 0; i < fname.size(); ++i) {
progressDialog.setLabelText(tr("Compiling the current file..."));
progressBar.setValue(i);
}
This works fine in windows i.e. the progress dialog is visible when the compile is in progress but this does not show the progress bar in Linux. Please let me know what the possible error could be and how to rectify.