[Development] Changed enum property behaviour in Qt v6.8
Phil Thompson
phil at riverbankcomputing.com
Thu Oct 3 13:40:16 CEST 2024
Hi,
Prior to Qt v6.8 it was possible to define a meta-object property with
an enum type where the enum was *not* registered with Q_ENUM and the
result of QMetaProperty::isEnumType() would be true.
With v6.8 isEnumType() will return false. The change is the extra test
on the meta-type in the private QMetaProperty ctor. In this situation
the property does not have a valid meta-type and so the extra test
fails.
What was the reasoning behind the change?
The best solution would be to ensure the enum was registered with the
type system, however I am doing this dynamically (including building the
whole meta-object) and so Q_ENUM is inappropriate and I'm not seeing an
obvious alternative.
Any help would be appreciated.
Phil
More information about the Development
mailing list