원 대상

1247 단어 Qt5.5.0+
#include 

//#include 
//#include 
#include 

int main(int argc, char *argv[])
{
    QObject obj;
    const QMetaObject *metaObj = obj.metaObject();
    qDebug() << "class name: " << metaObj->className();
    qDebug() << "class info count: " << metaObj->classInfoCount();
    qDebug() << "methods: ";
    //  QMetaObject::methodOffset() , 
    for (int i = metaObj->methodOffset(); i < metaObj->methodCount(); ++i)
        qDebug() << metaObj->method(i).methodType() << " " << metaObj->method(i).methodSignature();
}

좋은 웹페이지 즐겨찾기