#1450
Add support for `Q_CLASSINFO` on qobjects
Likely add support for a #[q_classinfo("name", "value")] attribute on the qobject (similar to #[qml_element = "name"], this would need the following changes.
- Add
q_classinfoto allowed attrs
- Likely add parsing of the
q_classinfo(name, value)to a similar method toparse_qml_metadata, but likelyparse_metadata(as this is not limited to only QML, likely have a map of values stored in the ParsedQObject
- Add generation from the map of values to the C++ generation to add
Q_CLASSINFO(name, value)to the vector of metaobjects
-
Add extra unit tests to cover the cases
-
Add documentation to the extern "RustQt" book page
Discussed in https://github.com/KDAB/cxx-qt/discussions/1447
Originally posted by MolotovCherry May 7, 2026
In c++ we can do Q_CLASSINFO("DefaultProperty", "propertyName"), but I can't find any way to do this purely on the rust side without writing a c++ wrapper (this is useful for children)
Activity
0No activity yet.