6int main(
int argc,
char *argv[])
8 QCoreApplication app(argc, argv);
13QQmlComponent component(&engine,
"MyItem.qml");
14QObject *object = component.create();
17QString msg =
"Hello from C++";
18QMetaObject::invokeMethod(object,
"myQmlFunction",
19 Q_RETURN_ARG(QString, returnedValue),
22qDebug() <<
"QML function returned:" << returnedValue;