attribute()

Return the value of an attribute or a default value if no such attribute is known.

Synopsis:

#include <qpps/object.h>
 
Variant attribute( 
            const QString &name, 
            const Variant &defaultValue = Variant() ) const;

Arguments:

name
The attribute being read.
defaultValue
The default value to return if the attribute isn't found. If you don't define defaultValue and the attribute isn't found, an empty Variant is returned.

Description:

Return the value of an attribute or a default value if no such attribute is known.

Returns:

Returns a Variant containing the attribute's value, when the attribute was found. Otherwise, the Variant contains the specified default value or is empty (if no default value was specified).