Counting and looping properties
hi,
i have a class with properties and i want to make automatic XML saving of all properties.
can i loop trough all properties?
something like this
Code:
for(quint i=0;i<propertiesCount();i++)
{
saveToXml(properties[i]);
}
Maybe someone have a solution that i can apply?
or there is another way, that is commonly used?
Thank you
Re: Counting and looping properties
Re: Counting and looping properties
ill try this:
Code:
for(int i = metaObject->propertyOffset(); i < metaObject->propertyCount(); ++i)
properties <<
QString::fromLatin1(metaObject
->property
(i
).
name());
thanks