<?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[How to change icons of QFileSystemModel ?]]></title><description><![CDATA[<p dir="auto"><img src="http://i1.piimg.com/596095/2c60d478ced810f8.jpg" alt="alt text" class=" img-fluid img-markdown" /><br />
System: Deepin Linux<br />
Source Code: <a href="https://github.com/sonichy/HTYFileManager" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/sonichy/HTYFileManager</a></p>
]]></description><link>https://forum.qt.io/topic/79831/how-to-change-icons-of-qfilesystemmodel</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 10:45:20 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/79831.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 01 Jun 2017 05:29:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to change icons of QFileSystemModel ? on Sat, 03 Jun 2017 02:28:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sonichy">@<bdi>sonichy</bdi></a> said in <a href="/post/396667">How to change icons of QFileSystemModel ?</a>:</p>
<blockquote>
<p dir="auto">Queston is specific: How to change icon after QFileSystemModel bind to system directory. To realize image preview.</p>
</blockquote>
<p dir="auto">Next time please describe more details in your post, we do not have supernatual  power, it is hard to guess what do you want to do. Your problem may seem obvious to yourself, but usually this is not true for other, that is why we need to give more information when asking questions.</p>
<p dir="auto">If you want to post your codes and expect us to read it, please make a minimal one, make your classes, functions as short as possible(I believe most of us think small classes and functions easier to read than large one), do not put all of the codes at once. Your long classes and functions may seem clear for you within 3 months, but not for other.</p>
]]></description><link>https://forum.qt.io/post/397087</link><guid isPermaLink="true">https://forum.qt.io/post/397087</guid><dc:creator><![CDATA[tham]]></dc:creator><pubDate>Sat, 03 Jun 2017 02:28:06 GMT</pubDate></item><item><title><![CDATA[Reply to How to change icons of QFileSystemModel ? on Sat, 03 Jun 2017 01:01:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joeq">@<bdi>joeQ</bdi></a> 我来自中国湖南衡阳</p>
]]></description><link>https://forum.qt.io/post/397084</link><guid isPermaLink="true">https://forum.qt.io/post/397084</guid><dc:creator><![CDATA[sonichy]]></dc:creator><pubDate>Sat, 03 Jun 2017 01:01:38 GMT</pubDate></item><item><title><![CDATA[Reply to How to change icons of QFileSystemModel ? on Thu, 01 Jun 2017 07:42:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sonichy">@<bdi>sonichy</bdi></a> Also use the</p>
<pre><code class="language-cpp">void QFileSystemModel::setIconProvider(QFileIconProvider *provider)
Sets the provider of file icons for the directory model.
</code></pre>
<p dir="auto">Try it again.</p>
]]></description><link>https://forum.qt.io/post/396680</link><guid isPermaLink="true">https://forum.qt.io/post/396680</guid><dc:creator><![CDATA[joeQ]]></dc:creator><pubDate>Thu, 01 Jun 2017 07:42:59 GMT</pubDate></item><item><title><![CDATA[Reply to How to change icons of QFileSystemModel ? on Thu, 01 Jun 2017 07:41:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sonichy">@<bdi>sonichy</bdi></a></p>
<pre><code class="language-cpp">QIcon QFileSystemModel::fileIcon(const QModelIndex &amp;index) const
Returns the icon for the item stored in the model under the given index.
</code></pre>
<p dir="auto">we can get the <code>QIcon</code> from the <code>QFileSystemModel</code> from <code>QModelIndex</code>. How to set the <code>QIcon</code> ?</p>
<p dir="auto">would you try <code>setdata</code> use the <code>QFileSystemModel::FileIconRole</code> ?</p>
]]></description><link>https://forum.qt.io/post/396678</link><guid isPermaLink="true">https://forum.qt.io/post/396678</guid><dc:creator><![CDATA[joeQ]]></dc:creator><pubDate>Thu, 01 Jun 2017 07:41:06 GMT</pubDate></item><item><title><![CDATA[Reply to How to change icons of QFileSystemModel ? on Thu, 01 Jun 2017 08:33:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sonichy">@<bdi>sonichy</bdi></a> oh, sorry, i misunderstood you.let's help you. Friend, Are you come from Jiuzhaigou in Sichuan Province ?</p>
]]></description><link>https://forum.qt.io/post/396672</link><guid isPermaLink="true">https://forum.qt.io/post/396672</guid><dc:creator><![CDATA[joeQ]]></dc:creator><pubDate>Thu, 01 Jun 2017 08:33:10 GMT</pubDate></item><item><title><![CDATA[Reply to How to change icons of QFileSystemModel ? on Thu, 01 Jun 2017 07:26:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joeq">@<bdi>joeQ</bdi></a> I wrote the code, I am looking for a solution to this issue.</p>
]]></description><link>https://forum.qt.io/post/396668</link><guid isPermaLink="true">https://forum.qt.io/post/396668</guid><dc:creator><![CDATA[sonichy]]></dc:creator><pubDate>Thu, 01 Jun 2017 07:26:42 GMT</pubDate></item><item><title><![CDATA[Reply to How to change icons of QFileSystemModel ? on Thu, 01 Jun 2017 07:24:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> Queston is specific: How to change icon after QFileSystemModel bind to system directory. To realize image preview.</p>
]]></description><link>https://forum.qt.io/post/396667</link><guid isPermaLink="true">https://forum.qt.io/post/396667</guid><dc:creator><![CDATA[sonichy]]></dc:creator><pubDate>Thu, 01 Jun 2017 07:24:32 GMT</pubDate></item><item><title><![CDATA[Reply to How to change icons of QFileSystemModel ? on Thu, 01 Jun 2017 07:23:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sonichy">@<bdi>sonichy</bdi></a> Hi, I saw the code. This project is not complicated. so, if you watched the code, and debug it. you will know the way, how to change the icons. Please read the code carefully.</p>
]]></description><link>https://forum.qt.io/post/396666</link><guid isPermaLink="true">https://forum.qt.io/post/396666</guid><dc:creator><![CDATA[joeQ]]></dc:creator><pubDate>Thu, 01 Jun 2017 07:23:50 GMT</pubDate></item><item><title><![CDATA[Reply to How to change icons of QFileSystemModel ? on Thu, 01 Jun 2017 07:17:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sonichy">@<bdi>sonichy</bdi></a> Hi, friend, welcome. what's system you used ? are you from china?</p>
]]></description><link>https://forum.qt.io/post/396664</link><guid isPermaLink="true">https://forum.qt.io/post/396664</guid><dc:creator><![CDATA[joeQ]]></dc:creator><pubDate>Thu, 01 Jun 2017 07:17:18 GMT</pubDate></item><item><title><![CDATA[Reply to How to change icons of QFileSystemModel ? on Thu, 01 Jun 2017 06:58:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sonichy">@<bdi>sonichy</bdi></a> Could you please ask a more specific question?<br />
Or do you expect others to read your source-code and try to find out or guess what the problem is?</p>
]]></description><link>https://forum.qt.io/post/396655</link><guid isPermaLink="true">https://forum.qt.io/post/396655</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Thu, 01 Jun 2017 06:58:34 GMT</pubDate></item></channel></rss>