<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I've created the bug report:<br>
<a class="moz-txt-link-freetext" href="https://bugreports.qt.io/browse/QTBUG-81093">https://bugreports.qt.io/browse/QTBUG-81093</a><br>
</p>
<div class="moz-cite-prefix">On 1/2/2020 7:48 AM, Alexander Dyagilev
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:4ab6e16b-e95a-1d50-8812-39b4f2fc8071@gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p>Hello,</p>
<p>Why this can happen? <br>
</p>
<p>I'm getting empty root objects, errors in Application Output
tab in Qt Creator and empty qmlWarnings variable.<br>
</p>
<p><span style=" color:#800000;">m_engine</span>.<span style="
color:#00677c;">reset</span>(<span style=" color:#808000;">new</span><span
style=" color:#c0c0c0;"> </span>QQmlApplicationEngine);</p>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">QList</span><<span style=" color:#800080;">QQmlError</span>><span style=" color:#c0c0c0;"> </span><span style=" color:#092e64;">qmlWarnings</span>;</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">qtconnect</span>(<span style=" color:#800000;">m_engine</span>.<span style=" color:#00677c;">data</span>(),<span style=" color:#c0c0c0;"> </span>&QQmlApplicationEngine::warnings,</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span>[&<span style=" color:#092e64;">qmlWarnings</span>](<span style=" color:#808000;">const</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">QList</span><<span style=" color:#800080;">QQmlError</span>><span style=" color:#c0c0c0;"> </span>&<span style=" color:#092e64;">warnings</span>)</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span>{</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#092e64;">qmlWarnings</span>.<span style=" color:#00677c;">append</span>(<span style=" color:#092e64;">warnings</span>);</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span>});</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">m_engine</span>-><span style=" color:#00677c;">load</span>(<span style=" color:#092e64;">qmlUrl</span>);</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">if</span><span style=" color:#c0c0c0;"> </span>(<span style=" color:#800000;">m_engine</span>-><span style=" color:#00677c;">rootObjects</span>().<span style=" color:#00677c;">isEmpty</span>())</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span>{</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">m_initFailed</span>.first<span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">true</span>;</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">m_errorDesc</span><span style=" color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">QObject</span>::<span style=" color:#00677c;">tr</span>(<span style=" color:#008000;">"QML</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">load</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">failure."</span>);</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span>}</pre>
</blockquote>
</body>
</html>