Modeless dialogs on Mac are not kept on top



  • I noticed on the Mac version of my application, that modeless dialogs are not kept on top when the user clicks on the main window application. The dialogs "disappear" behind the application main window.

    This problem is happening only on Mac, not on Windows or Linux (Gnome). I noticed this problem after upgrading my application from Qt 4.6.3 to the latest version (Qt 4.8.3).

    Is there a way to force the dialog to stay on top of the application main window? I can not create the dialog with Qt::Tool flag (that would cause the dialog toolbar to be different than a normal dialog toolbar) nor I can use the Qt::WindowStaysOnTopHint flag (that would cause the dialog to be on top of any window opened in the system, also the ones of other applications).

    Thanks in advance for your help


  • Moderators

    Is the dialog's parent the mainwindow?



  • yes it is

    This is how I create the dialog

    @
    MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags f)
    : QMainWindow(parent, f)
    {
    // Modeless Dialog
    _dialog = new QDialog(this);

        ....
    

    }
    @

    and this is how I show the dialog

    @void MainWindow::openDialog()
    {
    _dialog->show();
    _dialog->raise();
    _dialog->activateWindow();
    }@



  • I have the EXACT same problem.



  • I have the same problem too, and am a little desesperate that no one has posted an answer or workaround yet.

    Kalos or Tallia1, were you able to find a solution?



  • No, sorry.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.