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

Quick Dialog(/Popup) has no keyboard focus after opening

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.3
    • Quick: Controls 2
    • Windows 10 21H1 (Build 19043.1526)
    • Windows

    Description

      I have a dialog with buttons where one button gets focus after opening. If I do not call forceActiveFocus on the dialog it will not get focus on opening. I have not much to go on, but according to >this< forum post this is a bug that "should" have been fixed.

      How to reproduce:

      1. Start example app
      2. Klick the button on the top
      3. The dialog opens, there is no visible focus on the button, tab switches focus on the buttons in the background
      4. close the dialog
      5. Klick the button on the bottom
      6. The dialog opens, there is visible focus on the button, tab switches focus on the buttons in the dialog

      I have a custom button in the example to visualize the focus, if the button has focus the font turns bold.

       

      "Bonus" - (More things I noticed, do you like issues for those?)

      1. The default windows style(no style set) does not show focus on the buttons
      2. Fusion style - The button shows the blue focus frame only after the focus changed, but not initially - You can observe this in the example if you click the bottom button. After the dialog opened you can see the font of the button is bold but the blue frame is not visible, after pressing tab the focus changes and the other button will have a blue frame.
      3. Pressing space on buttons focused buttons clicks them, but the enter/return key does not?

      If you like an issue for any of these I am happy to provide you with one.

      Attachments

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Marscho Marscho
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: