Skip to content

Instantly share code, notes, and snippets.

@TheKewlStore
TheKewlStore / item_data.py
Last active August 3, 2022 14:06
PyQt4 QAbstractItemModel subclasses
""" Define a data container to be used with model subclasses that emits a generic signal whenever data in the internal dictionary
is changed. This creates a consistent API layer with model items that can be edited programatically as dictionaries, and
automatically kept synchronized in the model and the view.
"""
__author__ = 'Ian Davis'
__all__ = ['ItemData', ]
from api.util.event_util import Signal