class ListProperty#

The ListProperty class allows applications to expose list-like properties of QObject-derived classes to QML. The usage is shown in the Extending QML - Object and List Property Types Example and the Extending QML - Using List Property Types example.

__init__(type, append, count=None, at=None, clear=None, removeLast=None, doc='', notify=None, designable=True, scriptable=True, stored=True, user=False, constant=False, final=False)#
Parameters:
  • type (type) – Element type

  • append (callable) – A function to append an item

  • count (callable) – A function returning the list count

  • at (callable) – A function returning the item at an index

  • clear (callable) – A function to clear the list

  • removeLast – A function to remove the last item

  • doc (str) – Doc string

  • notify (Signal) – A signal emitted when a change occurs

  • designable (bool) – Not used in QML

  • scriptable (bool) – Not used in QML

  • stored (bool) – Whether the property is stored

  • user (bool) – Not used in QML

  • constant (bool) – Whether the property is constant

  • final (bool) – Whether the property is final