Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Modeless dialogs on Mac are not kept on top
Qt 6.11 is out! See what's new in the release blog

Modeless dialogs on Mac are not kept on top

Scheduled Pinned Locked Moved General and Desktop
6 Posts 4 Posters 3.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kalos
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      Is the dialog's parent the mainwindow?

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kalos
        wrote on last edited by
        #3

        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();
        }@

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tallia1
          wrote on last edited by
          #4

          I have the EXACT same problem.

          1 Reply Last reply
          0
          • F Offline
            F Offline
            floatingWoods
            wrote on last edited by
            #5

            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?

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tallia1
              wrote on last edited by
              #6

              No, sorry.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved