Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-2793

Application menu is not merged if application starts with main window hidden

    XMLWordPrintable

Details

    Description

      With an application that has a toplevel QMainWindow :
      create a typical menu structure in the main window's menu bar

      • the menu contains a quit action
      • according to a saved previous state, the application can start up by only showing it's system tray icon

      The expected Qt behaviour is that the Mac application menu should be merged independently on whether the main window starts shown or hidden

      instead if the main window is not shown during startup, but later by the user, the Mac menu is not merged, and the Apple-Q shortcut quits the event loop, instead of triggering an action

      • if the main window is shown during startup, the menu is properly merged

      A workaround is to always show mainwindow on startup, and then hide it according to the preferences when they are loaded (drawback: this leads to flicker, in case loading the preferences is delayed)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            dettman Dean Dettman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes