QML Scripting Object Reflection

Prerequisites

  • The following methods are exposed by the Reflection object implemented by the module Thinkbox.Sequoia.Debugging
  • Before calling these methods, you must ensure the module is imported.
import Thinkbox.Sequoia.Debugging 1.0

Reflection Methods

  • The following methods exposed by the Reflection object let you inspect the Properties and Methods of QML Objects:

<String> Reflection.properties ( <QObject>object, [ <Bool>linebreak ] )

  • Returns a string listing all properties exposed by the specified object.
  • The first argument is the QObject to inspect.
  • The second, optional boolean argument defaults to True.
    • When set to True, linebreaks will be inserted in order to place each property on a new lone.
    • When set to False, all properties will be output into a single line.

<String> Reflection.methods ( <QObject>object, [ <Bool>linebreak ] )

  • Returns a string listing all methods exposed by the specified object.
  • The first argument is the QObject to inspect.
  • The second, optional boolean argument defaults to True.
    • When set to True, linebreaks will be inserted in order to place each methods on a new lone.
    • When set to False, all methods will be output into a single line.

Example:

console.log (Reflection.methods( NodeControl ));