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

QApplication obtains focus when started

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.1.1, 5.3.2, 5.4.0 Beta
    • GUI: Window management
    • None
    • Mac OS X 10.10, Mac OS X 10.9
    • macOS

      When an Application is started it obtains focus as soon as the QApplication is executed.

      I expect that the Application only gets focus once it shows it's windows (unless flags like WindowDoesNotAcceptFocus are set). Qt 4.8 behaved that way.

      This makes it impossible to have silent/stealth background process which has the possibility to show a window if needed.

      QCoreApplication won't obtain focus, but you can't have Widgets with QCoreApplication.

      There is a small example attached which showcases the issue.

        1. main.cpp
          0.5 kB
          Timo Christ
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            sorvig Morten Sørvig
            timo.christ Timo Christ
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes