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

QStringList can't handle single strings in QML

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.0.0
    • None
    • a37b28d19805775de2a448667a9129f2c360c956
    • fdbdbbdd4ff05d1ceb7667227db5b14687a77c96

    Description

      Given a QObject exposed to QML with a QStringList property, foo, one would expect the two following lines to give the same result
      foo: "A"
      foo: ["A"]
      As list properties in QML do not require square brackets for lists of size one.

      However, with QStringList only the second line works, the first line gives the following error message:

      Invalid property assignment: unsupported type "QStringList"
      foo: "A"

      Failing project attached.

      Attachments

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

        Activity

          People

            chriadam Christopher Adams (closed Nokia identity) (Inactive)
            aalpert-nokia Alan Alpert (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes