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

More detailed docs needed

XMLWordPrintable

    • a8fdea9460ffd4814240543b0fd340aee593db85

      At http://doc.trolltech.com/latest/qml-qt.html#createQmlObject-method we're told that

       
      If filepath is specified, it will be used for error reporting for the created object.
      
      Example (where parentItem is the id of an existing QML item):
       var newObject = Qt.createQmlObject('import QtQuick 1.0; Rectangle {color: "red"; width: 20; height: 20}',
           parentItem, "dynamicSnippet1")
      
      In the case of an error, a QtScript Error object is thrown. This object has an additional property, qmlErrors, which is an array of the errors encountered. Each object in this array has the members lineNumber, columnNumber, fileName and message.
      

      So:

      • filepath is optional? If so, what is its default value?
      • we're told what parentItem is but we have no context info for "dynamicSnippet1"
      • in case of error, we could guess that the error objects will contain filepath as the fileName, but if so, where are the lineNumber, columnNumber and message coming from? And what is the connection between all these and the string containing the QML object to be created?

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

            aalpert-nokia Alan Alpert (closed Nokia identity) (Inactive)
            lucian Lucian Tomuta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes