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

Documentation: Component.createObject can be improved

    XMLWordPrintable

Details

    • b1e9bc580adc1e7b3b1398f392016880dc5201ba (qt/qtdeclarative/5.12)

    Description

      in these pages:

      https://doc.qt.io/qt-5/qml-qtqml-component.html
      and
      https://doc.qt.io/qt-5/qtqml-javascript-dynamicobjectcreation.html

      the quotes in the second arugment aren't needed :

      component.createObject(parent, {"x": 100, "y": 100});
      

      and

      component.createObject(parent, {x: 100, y: 100});
      

      work similarly (but the second is prettier).

      Attachments

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

        Activity

          People

            paulwicking Paul Wicking
            jcelerier Jean-Michaƫl Celerier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes