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

VirtualKeyboardSettings.availableLocales are not available at Component.onCompleted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.5.6, 6.7.2, 6.8.0 Beta4
    • Virtual Keyboard
    • None
    • Windows 10 22H2

    Description

      Code

      import QtQuick
      import QtQuick.Controls.Basic
      import QtQuick.VirtualKeyboard
      import QtQuick.VirtualKeyboard.Settings
      
      Window {
          id: window
          width: 640
          height: 480
          visible: true
      
          function printLocales() {
              console.log("Available locales:", VirtualKeyboardSettings.availableLocales)
          }
      
          Column {
              TextField {}
              Button {
                  text: "List available locales"
                  onClicked: window.printLocales()
              }
          }
      
          InputPanel {
              id: inputPanel
              z: 99
              x: 0
              y: window.height - (inputPanel.active ? inputPanel.height : 0)
              width: window.width
          }
      
          Component.onCompleted: window.printLocales()
      }
      

       

      Steps to reproduce

      1. Run the code above
      2. Click on the Button

       

      Outcomes

      • (Step #2) The console prints a list of supported locales when the button is clicked (Expected)
      • (Step #1) The console prints an empty list at startup (Not Expected)

      Attachments

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

        Activity

          People

            jakoivik Jarkko Koivikko
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes