En esta página

QMetaClassInfo Class

La clase QMetaClassInfo proporciona información adicional sobre una clase. Más información...

Encabezado: #include <QMetaClassInfo>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core

Funciones públicas

const char *name() const
const char *value() const

Descripción detallada

Los elementos de información de clase son simples paresnombre-valor que se especifican mediante Q_CLASSINFO() en el código fuente. La información se puede recuperar mediante name() y value(). Por ejemplo:

class MyClass : public QObject
{
    Q_OBJECT
    Q_CLASSINFO("author", "Sabrina Schweinsteiger")
    Q_CLASSINFO("url", "http://doc.moosesoft.co.uk/1.0/")

public:
    //...
};

Este mecanismo es de uso gratuito en tus aplicaciones Qt.

Nota: También lo utiliza la Active Qt, Qt D-Bus, Qt Qmly Qt Remote Objects . Es posible que algunas claves se configuren al utilizar estos módulos.

Véase también QMetaObject.

Documentación de funciones de miembro

const char *QMetaClassInfo::name() const

Devuelve el nombre de este elemento.

Véase también value().

const char *QMetaClassInfo::value() const

Devuelve el valor de este elemento.

Véase también name().

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.