QMetaProperty(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

πŸ’– QMetaProperty(3qt) πŸ’–

ok so bestie, welcome to the QMetaProperty page from the Qt 3 manual, section 3qt. this one's short and sweet and honestly kind of iconic for what it does. let's get into it 🫢


✨ NAME ✨

QMetaProperty β€” it's the little container that stores meta data about a property. that's the whole job. it holds the receipts πŸ“


🌸 SYNOPSIS 🌸

#include <qmetaobject.h>

πŸ‘‘ Public Members πŸ‘‘

const char * type () const
const char * name () const
bool writable () const
bool isSetType () const
bool isEnumType () const
QStrList enumKeys () const
int keyToValue ( const char * key ) const
const char * valueToKey ( int value ) const
int keysToValue ( const QStrList & keys ) const
QStrList valueToKeys ( int value ) const
bool designable ( QObject * o = 0 ) const
bool scriptable ( QObject * o = 0 ) const
bool stored ( QObject * o = 0 ) const
bool reset ( QObject * o ) const

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, the QMetaProperty class stores meta data about a property. that's it, that's the vibe. πŸ’…

the meta data it's holding includes type(), name(), and whether a property is writable(), designable() and stored(). all the little facts about a property, living in one place, slaying ✨

the functions isSetType(), isEnumType() and enumKeys() give you even more info about a property's type. and the conversion girlies β€” keyToValue(), valueToKey(), keysToValue() and valueToKeys() β€” let you convert between the integer representation of an enumeration or set value and its literal representation. so you can go back and forth, no cap πŸ”

heads up bestie: actual property values are set and received through QObject's set and get functions. peep QObject::setProperty() and QObject::property() for the deets.

and you receive meta property data through an object's meta object. see QMetaObject::property() and QMetaObject::propertyNames() for the deets on that.

See also: Object Model 🧚


πŸ’œ MEMBER FUNCTION DOCUMENTATION πŸ’œ

bool QMetaProperty::designable ( QObject * o = 0 ) const

returns TRUE if the property is designable for object o; otherwise returns FALSE.

if no object o is given, the function returns a static approximation. (iykyk β€” it's just an estimate at that point πŸ™ˆ)

QStrList QMetaProperty::enumKeys () const

returns the possible enumeration keys if this property is an enumeration type (or a set type). all the options, laid out πŸŽ€

See also: isEnumType().

bool QMetaProperty::isEnumType () const

returns TRUE if the property's type is an enumeration value; otherwise returns FALSE.

See also: isSetType() and enumKeys().

bool QMetaProperty::isSetType () const

returns TRUE if the property's type is an enumeration value that is used as set, i.e. if the enumeration values can be OR-ed together; otherwise returns FALSE. a set type is implicitly also an enum type. like, it's giving enum but with extra ✨

See also: isEnumType() and enumKeys().

int QMetaProperty::keyToValue ( const char * key ) const

converts the enumeration key key to its integer value. πŸ”’

for set types, use keysToValue() instead, okay?

See also: valueToKey(), isSetType(), and keysToValue().

int QMetaProperty::keysToValue ( const QStrList & keys ) const

converts the list of keys keys to their combined (OR-ed) integer value. mashing them all together into one number πŸ’₯

See also: isSetType() and valueToKey().

const char * QMetaProperty::name () const

returns the name of the property. literally just the name. iconic, minimal, we love her πŸ’…

bool QMetaProperty::reset ( QObject * o ) const

tries to reset the property for object o with a reset method. on success, returns TRUE; otherwise returns FALSE.

reset methods are optional, and usually only a few properties support them. so don't come for her if she says no πŸ™ˆ

bool QMetaProperty::scriptable ( QObject * o = 0 ) const

returns TRUE if the property is scriptable for object o; otherwise returns FALSE.

if no object o is given, the function returns a static approximation.

bool QMetaProperty::stored ( QObject * o = 0 ) const

returns TRUE if the property shall be stored for object o; otherwise returns FALSE.

if no object o is given, the function returns a static approximation.

const char * QMetaProperty::type () const

returns the type of the property. yes bestie, that's the whole paragraph. short queen πŸ‘‘

const char * QMetaProperty::valueToKey ( int value ) const

converts the enumeration value value to its literal key. πŸ”‘

for set types, use valueToKeys().

See also: isSetType() and valueToKeys().

QStrList QMetaProperty::valueToKeys ( int value ) const

converts the set value value to a list of keys.

See also: isSetType() and valueToKey().

bool QMetaProperty::writable () const

returns TRUE if the property is writable; otherwise returns FALSE. can you touch it or not, that's the question ✍️


🌈 SEE ALSO 🌈


Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. see the license file included in the distribution for a complete license statement.


⭐ AUTHOR ⭐

Generated automatically from the source code. (yes, the author is a robot. respect the robot πŸ€–)


πŸ’€ BUGS πŸ’€

if you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. good bug reports help us to help you. thank you. πŸ™

the definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. this man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. (not me being the unofficial cousin of the docs 😭)

if you find errors in this manual page, please report them to qt-bugs@trolltech.com. please include the name of the manual page (qmetaproperty.3qt) and the Qt version (3.3.8).


okay that's the whole page bestie, you ate it, you understood it, you're basically a Qt historian now 🫢✨

sign-off: this was Trolltech AS, dated 2 February 2007, page QMetaProperty(3qt) β€” and yes, Qt version 3.3.8. love that for us. bye pookie πŸ’–
πŸ“¦ where this page comes from