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

QMessageBox before app.exec leads to incorrect focus state



    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.1
    • None
    • macOS


      I show a message box before starting the main event loop. After closing the message box, the main application window appears in a bad state:

       - the window does not have focus

       - none of the widgets have focus, and clicking any of the line edits does not make them highlight as expected, yet entering text works.

      The application gets to a normal state if I click into a line edit, then switch to a different application and back.

      I did not manage to create an example application reproducing all issues in C++. For a complete test application please see PYSIDE-1771. I attached an example application reproducing the window focus issue and screenshots of the behaviour:

       1. Startup: no window focus, line edit has focus highlight, but does not accept input

       2. After clicking on the window titlebar: window has focus, line edit accepts input


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



            qt.team.quick.subscriptions Qt Quick and Widgets Team
            zxn Zoltan Szocs
            0 Vote for this issue
            2 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes