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

ComboBox currentText is empty when using a JSON model

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.4.2, 6.5.0 Beta2
    • Quick: Controls 2
    • None

      When using a ComboBox whith the model being a QVariantList each variant being a QJsonObject , setting textRole does not work properly.

      Items in the drop down menu are correctly displaying the text, but the "current text" of the combo box is empty.

      Properties currentText and displaytext are empty.

      It was working fine with Qt 6.3 (see screenshots).

      I have attached a minimal example that reproduce the behavior.

        1. test_comboxboxrole.zip
          2 kB
        2. qt6.4.png
          qt6.4.png
          2 kB
        3. qt6.3.png
          qt6.3.png
          2 kB
        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
            bterrier Benjamin Terrier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes