pally_sandher
8th March 2012, 11:46
I'm trying to implement a QProgressDialog as a "busy" prompt to give the user some feedback that something is happening while a function executes but my code shows the QProgressDialog & doesn't continue processing the rest of the code unless I close the QProgressDialog using the close button.
QWinWidget win( launchParams.hWndParent );
QProgressDialog progress ("Initializing Model Viewer II\nPlease wait...", QString(), 0, 0);
progress.setWindowModality(Qt::WindowModal);
progress.exec();
gModelViewer = new VE2Modelviewer ( launchParams.flags, QString::fromAscii(launchParams.veXMLPath), &win );
if( gModelViewer->LoadModel( launchParams.veXMLPath ) )
{
gModelViewer->show();
progress.hide();
this just sits with the progressbar in the QProgressDialog looping endlessly. gModelViewer will never be shown without user interaction dismissing the QProgressDialog.
Any help would be most appreciated.
QWinWidget win( launchParams.hWndParent );
QProgressDialog progress ("Initializing Model Viewer II\nPlease wait...", QString(), 0, 0);
progress.setWindowModality(Qt::WindowModal);
progress.exec();
gModelViewer = new VE2Modelviewer ( launchParams.flags, QString::fromAscii(launchParams.veXMLPath), &win );
if( gModelViewer->LoadModel( launchParams.veXMLPath ) )
{
gModelViewer->show();
progress.hide();
this just sits with the progressbar in the QProgressDialog looping endlessly. gModelViewer will never be shown without user interaction dismissing the QProgressDialog.
Any help would be most appreciated.