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

Command-click to avoid activating window does not work with a dropdown menu

    XMLWordPrintable

Details

    Description

      Hello,

      On Mac OS X, there is the possibility to interact with a window of an application that is not active without activating it.

      For example, do the test with a browser (e.g.: Chrome) in the background and a Finder window activated, in the foreground. By pressing the Command key (Apple key) and clicking Chrome, won't activate it and Finder will keep the focus. You can change Chrome's tab, drag window, make right click on web pages, click buttons, click and select html dropdown menus, ...

      With a Qt application, it works well for most QWidgets (QToolButton, QPushButton, title bar elements, drag window), but not when Command-clicking for

      • a QCombobox with a dropdown menu not empty,
      • a QToolButton's Arrow with a dropdown menu not empty,
        when clicking these elements, the Qt application is activated.

      Why would it be a Qt bug and not Cocoa/Mac OS X bug?

      • works for a subset of Qt's UI elements,
      • behavior is different for Qt 4.8 and Qt 5.0.

      When Command-clicking the QComboBox

      • Qt 4.8: the dropdown menu is shown; shown behind the window,
      • Qt 5.0: the dropdown menu is not shown.

      For convenience, I've attached to the ticket a sample Qt project reproducing the problem.

      Thanks

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            vince Vince
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes