I have a class that inherits from QObject. It contains a big dictionary of strings. I want to use all of them as properties to be able use them in assignments and QML. Now my class looks like this: from PySide6.QtCore import QObject, Signal, Property from functools import partial class Strings(QObject): def __init__(self, parent=None): super(Strings, self).__init__(parent) self._strings = { 'MainWindowTitle': 'Window', 'DriverNotLoadedStatus': 'Driver not loaded', 'DriverLoadedStatus': 'Driver loaded', } self._build_attrs() # super(Strings, self).__init__(parent) def _build_attrs(self): def common_getter(obj: Strings, prop: str): return obj._strings[prop] def common_setter(obj: Strings, value, prop: str): if getattr(obj, prop) != value: obj._strings[prop] = value signal_name = f'{prop}_changed' signal = getattr(obj, signal_name) signal.emit() for key in self._strings.keys(): signal_name = f'{key}_changed' notifySignal = Signal() setattr(Strings, signal_name, notifySignal) getter = partial(common_getter, prop=key) setter = partial(common_setter, prop=key) setattr(Strings, key, Property(str, getter, setter, notify=notifySignal)) But it doesn't work. Assignments and notifications works, but I can't access these properties in QML. I think this is because these properties wasn't added into QMetaObject, but I don't know how to do it on-the-fly. I tried to call constructor of base class after the all properties were added (look commented line in the code), but it doesn't help. Only signals are available in QML, but not properties. How to fix it? Continue reading...