AttributeListModel QML Type

Feature or Graphic."> AttributeListModel QML Type | ArcGISQtQml
  • Esri.ArcGISRuntime
  • AttributeListModel
  • A list model storing a list of key-value pairs to be used as attributes for a Feature or Graphic. More...

    Import Statement: import Esri.ArcGISRuntime
    Since: Esri.ArcGISRuntime 100.0




    Detailed Description

    Note: You cannot declare or create a component of this type in QML code.

    Modifying this model (adding or removing) will update the attributes available in the feature or graphic.

    The model returns data for the following roles:

    attributeNamestringThe name/key for the attribute.
    attributeValuevarThe value for the attribute.

    Property Documentation

    [read-only] attributeNames : list<string>

    A list of all the attribute names in the model (read-only).

    attributesJson : jsobject

    The attributes as a JSON representation.

    Providing attributes as JSON will replace all attributes in the model with the specified JSON attributes.

    [read-only] count : int

    Returns the number of attributes in the model (read-only).

    [read-only] error : Error

    Returns the last error that occurred on the model (read-only).

    Signal Documentation


    Emitted when the attributeNames property changes.

    Note: The corresponding handler is onAttributeNamesChanged.


    Emitted when the attributesJson property changes.

    Note: The corresponding handler is onAttributesJsonChanged.


    Emitted when the count property changes.

    Note: The corresponding handler is onCountChanged.


    Emitted when the error property changes, which can indicate that an error occurred.

    Note: The corresponding handler is onErrorChanged.

    Method Documentation

    var attributeValue(string attributeName)

    Returns an attribute value by attributeName.

    bool containsAttribute(string attributeName)

    Returns true if the model contains the provided attributeName.

    bool equals(AttributeListModel other)

    Returns true if this AttributeListModel is equal to other.

    void insertAttribute(string attributeName, var attributeValue)

    Inserts the value attributeValue of the attribute named attributeName.

    void removeAllAttributes()

    Removes all attributes from the model.

    void removeAttribute(string attributeName)

    Removes the attribute named attributeName from the model.

    void replaceAttribute(string attributeName, var attributeValue)

    Replaces the value attributeValue of the attribute named attributeName.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.