QMetaProperty prop = object->metaObject()->property(index); QVariant value = prop.read(object);
const QMetaObject *metaObject = object->metaObject(); for (int i = metaObject->propertyOffset(); i < metaObject->propertyCount(); ++i) { QMetaProperty prop = metaObject->property(i); QString propName = prop.name(); QString propType = prop.typeName(); bool isReadable = prop.isReadable(); bool isWritable = prop.isWritable(); // Do something with the property information }In this code, `object` is a pointer to the QObject whose properties you want to describe. The `metaObject()` function again returns a pointer to the QObject's meta-object. The `propertyOffset()` function returns the index of the first custom property (i.e. not part of QObject's default properties) in the meta-object. The `propertyCount()` function returns the number of properties in the meta-object. The `property()` function is used to retrieve a QMetaProperty object for each property, which can then be used to retrieve information about the property such as its name, type, and read/write permissions. The QMetaProperty class is part of the Qt Core library.