Topics

Note Selector

Attribute Value Replacement

Saturday, December 4, 2021

Handwritten Attribute Value Replacement Example

When XAV updates, the line editor and slider's attributes need to emit value_changed().

My first idea was to subclass QVariant as AttributeValue so that the value itself would be capable of emitting a changed signal.

It is important to note that the Attribute::value_changed() signal should remain, and when AttributeValue::value_changed() emits, it should also cause Attribute::value_changed() to emit.

When an Attribute replaces its values with another Attribute, it needs to connect the new values.