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

Editable ComboBox: its contentItem/TextField never looses focus, preventing focusChanged signal from being dispatched

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.7, 6.8
    • Quick: Controls 2
    • None
    • Linux/Wayland

      QQC2.ComboBox is typically implemented as a contentItem: T.TextField with a binding like readOnly: !control.editable. The said TextField apparently never looses focus unless the combobox's popup is opened, so onFocusChanged does not get called when simply switching the focus to another control.

      As a consequence, it prevents, for example, repositioning a context menu toolbar whenever the text field is refocused.

      See also: QTBUG-125628

      Reproducible example in the attached file: click on the ComboBox, then on the button below, then on the ComboBox again; try clicking on the indicator to open the popup and see the difference in logs.

        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
            ratijas ivan tkachenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes