qtinuum / QtnProperty

Extended properties for Qt5
Apache License 2.0
425 stars 153 forks source link

Use existing delegate for custom data type #51

Closed niello closed 2 years ago

niello commented 2 years ago

I have some custom types which closely resemble Qt types with property delegates already implemented. E.g. Colour -> QColor, glm::vec2 -> QPointF. I would like to reuse existing delegates and write as little bridge code as possible. In a perfect case there would be only two methods to convert between these types back and forth. What is the easiest way to reuse delegates right now? Are some improvements possible?

niello commented 2 years ago

@lexxmark, will QtnSinglePropertyValueAs work with multiproperty?

lexxmark commented 2 years ago

I'm not familiar with multiproperty. As it inherits OldValueType base property so I don't see any issues there. Try it.