<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[In the process of applying qt developed on Windows to Linux]]></title><description><![CDATA[<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/db256034-fc08-4ac8-994b-8d9926df4eb2.png" alt="b5ff7a95-c03f-49d9-b8aa-6f6f06bf909c-스크린샷, 2021-10-15 12-48-05.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I have a question during the process of applying qt developed on Windows to Linux.<br />
I'm getting this error after building, is it because the syntax is different? how can i solve it?</p>
]]></description><link>https://forum.qt.io/topic/131147/in-the-process-of-applying-qt-developed-on-windows-to-linux</link><generator>RSS for Node</generator><lastBuildDate>Sat, 20 Jun 2026 17:20:01 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/131147.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 15 Oct 2021 03:50:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to In the process of applying qt developed on Windows to Linux on Fri, 15 Oct 2021 04:09:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/iknowqt">@<bdi>IknowQT</bdi></a> said in <a href="/post/685195">In the process of applying qt developed on Windows to Linux</a>:</p>
<blockquote>
<p dir="auto">is it because the syntax is different?</p>
</blockquote>
<p dir="auto">I've never seen <code>in</code> used in a C++ for-loop before. Did it really work in Windows? What compiler did you use?</p>
<p dir="auto">Replace <code>in</code> with <code>,</code></p>
<pre><code>foreach (auto item, m_vIncuMgr)
{
    ...
}
</code></pre>
<p dir="auto">Even better, use the C++11 range-based for-loop: <a href="https://en.cppreference.com/w/cpp/language/range-for" target="_blank" rel="noopener noreferrer nofollow ugc">https://en.cppreference.com/w/cpp/language/range-for</a></p>
<p dir="auto">Also, in the future, please post text, not a screenshot.</p>
]]></description><link>https://forum.qt.io/post/685196</link><guid isPermaLink="true">https://forum.qt.io/post/685196</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Fri, 15 Oct 2021 04:09:52 GMT</pubDate></item><item><title><![CDATA[Reply to In the process of applying qt developed on Windows to Linux on Fri, 15 Oct 2021 10:00:24 GMT]]></title><description><![CDATA[<p dir="auto"><code>foreach (... in ...)</code> is a C# construct, and <code>for (... in ..)</code> is a JavaScript one.  Neither is right for Python.  Not for C++, where Qt has a <code>foreach()</code> macro with different syntax.</p>
<p dir="auto">The <code>for each (... in ...)</code> is an MSVC-only C++ construct, per <a href="https://docs.microsoft.com/en-us/cpp/dotnet/for-each-in?view=msvc-160" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.microsoft.com/en-us/cpp/dotnet/for-each-in?view=msvc-160</a>, and it warns:</p>
<blockquote>
<p dir="auto">This non-standard keyword is available in both C++/CLI and native C++ projects. However, its use isn't recommended. Consider using a standard Range-based for Statement (C++) instead.</p>
</blockquote>
<p dir="auto">:D</p>
]]></description><link>https://forum.qt.io/post/685265</link><guid isPermaLink="true">https://forum.qt.io/post/685265</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Fri, 15 Oct 2021 10:00:24 GMT</pubDate></item><item><title><![CDATA[Reply to In the process of applying qt developed on Windows to Linux on Fri, 15 Oct 2021 04:46:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/iknowqt">@<bdi>IknowQT</bdi></a> said in <a href="/post/685206">In the process of applying qt developed on Windows to Linux</a>:</p>
<blockquote>
<p dir="auto">There was nothing wrong with the build and it worked well.</p>
</blockquote>
<p dir="auto">I also never saw such a for loop in C++ (looks rather like a Python for loop)! Maybe this is something Microsoft invented in their C++ compiler. Anyway you should use what C++ standard specifies.</p>
]]></description><link>https://forum.qt.io/post/685209</link><guid isPermaLink="true">https://forum.qt.io/post/685209</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 15 Oct 2021 04:46:41 GMT</pubDate></item><item><title><![CDATA[Reply to In the process of applying qt developed on Windows to Linux on Fri, 15 Oct 2021 04:42:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jksh">@<bdi>JKSH</bdi></a></p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/07ea7596-07e1-4ebc-9c6b-c8a0914bd612.png" alt="35aec3f2-d14a-43f4-a036-e86fc8e62d2d-image.png" class=" img-fluid img-markdown" /></p>
<pre><code>for each (auto item in m_vIncuMgr)
{
	item-&gt;setCurremtStep(Index++);
}
</code></pre>
<p dir="auto">There was nothing wrong with the build and it worked well.<br />
Anyway, thanks for checking the issue.</p>
]]></description><link>https://forum.qt.io/post/685206</link><guid isPermaLink="true">https://forum.qt.io/post/685206</guid><dc:creator><![CDATA[IknowQT]]></dc:creator><pubDate>Fri, 15 Oct 2021 04:42:01 GMT</pubDate></item><item><title><![CDATA[Reply to In the process of applying qt developed on Windows to Linux on Fri, 15 Oct 2021 04:09:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/iknowqt">@<bdi>IknowQT</bdi></a> said in <a href="/post/685195">In the process of applying qt developed on Windows to Linux</a>:</p>
<blockquote>
<p dir="auto">is it because the syntax is different?</p>
</blockquote>
<p dir="auto">I've never seen <code>in</code> used in a C++ for-loop before. Did it really work in Windows? What compiler did you use?</p>
<p dir="auto">Replace <code>in</code> with <code>,</code></p>
<pre><code>foreach (auto item, m_vIncuMgr)
{
    ...
}
</code></pre>
<p dir="auto">Even better, use the C++11 range-based for-loop: <a href="https://en.cppreference.com/w/cpp/language/range-for" target="_blank" rel="noopener noreferrer nofollow ugc">https://en.cppreference.com/w/cpp/language/range-for</a></p>
<p dir="auto">Also, in the future, please post text, not a screenshot.</p>
]]></description><link>https://forum.qt.io/post/685196</link><guid isPermaLink="true">https://forum.qt.io/post/685196</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Fri, 15 Oct 2021 04:09:52 GMT</pubDate></item></channel></rss>