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

Documentation: Component.createObject can be improved

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.12.3
    • Fix Version/s: 5.12.5, 5.13.1, 5.14.0 Alpha
    • Component/s: Documentation
    • Labels:
      None
    • Commits:
      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

            • Assignee:
              paulwicking Paul Wicking
              Reporter:
              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