QMetaProperty(3qt)
π 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. peepQObject::setProperty()andQObject::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 π
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, pageQMetaProperty(3qt)β and yes, Qt version3.3.8. love that for us. bye pookie π
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms