Rework or replace the QtProperty system.
Currently, in Met.3D, we use the QtProperty system to edit various properties of the system and its actors.
However, both from a developer and usability perspective, it has several flaws.
From a developer perspective:
- It always takes a "huge" amount of work at several separate locations throughout the code to add a single, simple property. For actors, it is always needed to add the properties to: Constructor,
onQtPropertyChanged
,saveToConfiguration
,loadToConfiguration
, where you use it. With a clever design, we could reduce that to Constructor and were you use it. - Due to the first point, issues or small bugs arise sometimes, where a property doesn't save properly, its value is not used correctly etc.
- Often requires the developer to also add variable, which mirrors the value or state of the property, for ease of access.
- The
onQtPropertyChanged
method inMActor
often evolves into a huge function containing if else statements to execute the correct code for each property, which value was changed. - Always needs to add the property to the onQtPropertyChanged function, simply to update the mirror value or call
emitActorChangedSignal
. - When subclassing from
MActor
orMNWPMultiVarActor
, you always have to call the parent method manually too, otherwise no property from the parent class will work.
From a user perspective:
- Property tree often gets quite large and confusing. Finding properties often not easy.
- The user always must click the property at least once, before being able to change its value. Not a smooth experience.
I propose two different solutions:
- Write wrappers around the QtProperties. Will solve some of the developer issues, but none of the user issues.
- Write a replacement that fits our needs. Will solve the issues we prioritize, but takes time investment.
Edited by Thorwin Vogt