How to keep a dialog window in front of others windows.
-
Hello, :)
I would like to ask how to keep a dialog window in front of the main window when I click over it.
Thank you
All the best
Ricardo Sousa
-
Hello
Do you try the method setModal(true) ?
Fred -
Hello ,
Thank you for answering!:)
Yes I did this...
MGVD->setModal(true);
MGVD->show();But it didn´t work...
-
Is the "QDialog::exec":http://qt-project.org/doc/qt-4.8/qdialog.html#exec function you are looking for ?
-
like this...?
MGVD->exec();
no it didn´t work...
I read about it and its seems to be it...
Thank you cincirin :)
-
Re
I have this kind of problem but only on Windows not in Linux, but I don't found the solution.
Fred -
Hi,
try
@QDialog *yourDialog = new ...
yourDialog->setWindowFlags(yourDialog->windowFlags() | Qt::WindowStaysOnTopHint);
yourDialog->show();@ -
That´s it!
Thank you DerManu!:)Ricardo Sousa