[Interest] QQmlApplicationEngine::warnings is not emitted

Alexander Dyagilev alervdvcw at gmail.com
Thu Jan 2 05:48:12 CET 2020


Hello,

Why this can happen?

I'm getting empty root objects, errors in Application Output tab in Qt 
Creator and empty qmlWarnings variable.

m_engine.reset(newQQmlApplicationEngine);

QList<QQmlError>qmlWarnings;

qtconnect(m_engine.data(),&QQmlApplicationEngine::warnings,

[&qmlWarnings](constQList<QQmlError>&warnings)

{

qmlWarnings.append(warnings);

});

m_engine->load(qmlUrl);

if(m_engine->rootObjects().isEmpty())

{

m_initFailed.first=true;

m_errorDesc=QObject::tr("QMLloadfailure.");

}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200102/e887aaa5/attachment.html>


More information about the Interest mailing list