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 );
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();
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();
To copy to clipboard, switch view to plain text mode
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.
Bookmarks