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

Qt::Tool windows cannot be made Qt::WindowMinimized

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.14.2
    • None
    • macOS 10.15.6
    • macOS

    Description

      I'm trying to implement a Window menu that provides some standard menu items like Minimize and Zoom.  If a window is not minimized, my code tries to minimize it by doing:

      activeWindow->setWindowState(activeWindow->windowState() | Qt::WindowMinimized);

      I'm surprised to discover that, for some windows in my app, this results in a console log that says "Qt::Tool windows cannot be made Qt::WindowMinimized".  This is strange, because these same windows have a minimize button in their title bar, and clicking that button does indeed minimize them to my macOS Dock.  I just want to reproduce the same behavior with a menu item with a command-M shortcut, as is standard on macOS.  Why does setWindowState() refuse to do it, given that it is otherwise possible?  Is there a workaround?

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            bhaller Ben Haller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes