Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1771

QMessageBox before app.exec leads to incorrect state

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.2.1
    • PySide
    • None
    • macOS

    Description

      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 attached a small example application reproducing the issue and screenshots of the behaviour:

       - 1. Startup: no window foxus, no line edit focus

       - 2. After clicking on the window and into the line edits: window has focus, line edits don't

       - 3. After switching to a different application and back: now also the focused line edit has focus highlight

      The issue can be reproduced to some degree in Qt (without PySide) also. There the line edits behave correctly, but the application also starts without focus.

      Attachments

        1. 1.Startup.png
          1.Startup.png
          18 kB
        2. 2.AfterClickingTheWindow.png
          2.AfterClickingTheWindow.png
          31 kB
        3. 3.AfterSwitchingToOtherAppAndBack.png
          3.AfterSwitchingToOtherAppAndBack.png
          32 kB
        4. focus_test.py
          0.6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            zxn Zoltan Szocs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes