Hi,
I declared my own progress dialog in the mainWindow class, as
and in the mainWindow constructor
pDialog = new ProgressDialog(this);
pDialog = new ProgressDialog(this);
To copy to clipboard, switch view to plain text mode
Then in a function mainWindow::foo, I used following, to show the dialog box as a non modal form,
pDialog->setRange(0, 100);
pDialog->setWindowFlags(Qt::CustomizeWindowHint | Qt::Dialog | Qt::WindowTitleHint);
pDialog->show();
pDialog->setRange(0, 100);
pDialog->setWindowFlags(Qt::CustomizeWindowHint | Qt::Dialog | Qt::WindowTitleHint);
pDialog->show();
To copy to clipboard, switch view to plain text mode
I can only use it as non modal form, because I need to execute some more functions after showing (pDialog->show()) pDialog
After executing some function, I called
pDialog->hide();
pDialog->hide();
To copy to clipboard, switch view to plain text mode
to close the dialog window. On one pass (or a first call of mainWindow::foo), everything fine, and works as expected. But when I call the function again, it displays only the outlines (or a window only) of pDialog and it doesn't have any other widgets and buttons in the pDialog. Where is my mistake? How is the proper use of a non-modal dialog?
Thanking You,
Ras
Bookmarks