Qt for andriod

In Qt/QML application (this code usually resides in main.cpp of QtCreator project), what is the difference between following ways of exposing C++ class to QML:

qmlRegisterType("com.example",
                               1,
                               0,
                               "UePeopleModel");

and

engine.rootContext()->setContextProperty("uePeopleModel",
                                         uePeopleModel);

 

你可能感兴趣的:(Qt for andriod)