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

QQmlComponent can't use JS types for initial properties

    XMLWordPrintable

Details

    • bf115a446c1a633a11577306eff8a78028a7f5b5

    Description

      QQmlComponent::createWithInitialProperties and setInitialProperties take a QVariantMap of properties and don't 'unbox' QVariant(QJSValue), so it's impossible to set JS types as initial properties.

      This makes some types with required properties impossible to (correctly) create from the C++ API. It also means Qt.binding() can't be used like it can with Component.createObject() or Loader.setSource(). See the attached testcase.

      Attachments

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

        Activity

          People

            ulherman Ulf Hermann
            special John Brooks
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes