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

QML TextField Does Not Gain Focus When Tapped on Touchscreen with QQuickWidget

    XMLWordPrintable

Details

    • All

    Description

      When running a Qt 6.8.x application that uses QQuickWidget to host QML content, TextField elements do not gain focus when tapped on a touchscreen device. This makes it impossible for users to interact with TextFields via touch input.

      This issue does not occur:

      • With other input components like Button or TextArea within the same QML content using QQuickWidget.
      • In standalone QML applications (i.e., applications not using QQuickWidget).
      • In applications built with Qt 5.15 using QQuickWidget (works as expected there).

      Steps to Reproduce:

      1. Build and run the application on a touchscreen-enabled device
      1. Tap on the TextField inside the application window.

      Expected Result:
      The TextField should gain focus and the virtual keyboard (if available) should appear.

      Actual Result:
      The TextField does not gain focus when tapped, and the virtual keyboard does not appear.


      Tested Components:

      • TextField: ❌ Does not work with QQuickWidget on touch.
      • Button: ✅ Works as expected.
      • TextArea: ✅ Works as expected.

      Attachments

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

        Activity

          People

            tvete Paul Olav Tvete
            chakib Chakib Boutaghane
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes