<?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[Subclassing QAbstractProxyModel to work with QFileDialog]]></title><description><![CDATA[<p dir="auto">Hello,<br />
I would like to create a custom QFileDialog that has a special behaviour:</p>
<p dir="auto">I'd like the files in the directory to be represented as 1 file if they belong to such a sequence:</p>
<p dir="auto">@file0.jpg<br />
file1.jpg<br />
file2.jpg<br />
...@</p>
<p dir="auto">would be represented as only 1 item: @file#.jpg@</p>
<p dir="auto">Also whenever the user would select file#.jpg I'd like the file dialog to return all the associated file names.</p>
<p dir="auto">After reading all the Qt documentation I find it really hard to pull-off.<br />
I figured I'd have to subclass @QAbstractProxyModel@ and call @QFileDialog::setProxyModel@ but I don't really know what to do with the @QAbstractProxyModel@<br />
Does anybody have any idea on how to get started on this?</p>
]]></description><link>https://forum.qt.io/topic/27595/subclassing-qabstractproxymodel-to-work-with-qfiledialog</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 07:15:23 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/27595.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 25 May 2013 17:15:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Subclassing QAbstractProxyModel to work with QFileDialog on Sat, 25 May 2013 19:55:34 GMT]]></title><description><![CDATA[<p dir="auto">Do you mean deriving QFileDialog or make my own file dialog?<br />
In the later case, how would you custom the view so it has a behaviour as such :</p>
<ul>
<li>when the user clicks the directory, it show the content of the directory, it does not unfold an item in a QtreeView</li>
</ul>
<p dir="auto">Here is a picture of what I'd like it to be,<br />
<a href="http://img20.imageshack.us/img20/2613/desired.png" target="_blank" rel="noopener noreferrer nofollow ugc">http://img20.imageshack.us/img20/2613/desired.png</a></p>
<p dir="auto">and here is what I have with QTreeView:</p>
<p dir="auto"><a href="http://img822.imageshack.us/img822/7787/minep.png" target="_blank" rel="noopener noreferrer nofollow ugc">http://img822.imageshack.us/img822/7787/minep.png</a></p>
]]></description><link>https://forum.qt.io/post/180445</link><guid isPermaLink="true">https://forum.qt.io/post/180445</guid><dc:creator><![CDATA[Kepz]]></dc:creator><pubDate>Sat, 25 May 2013 19:55:34 GMT</pubDate></item><item><title><![CDATA[Reply to Subclassing QAbstractProxyModel to work with QFileDialog on Sat, 25 May 2013 19:40:43 GMT]]></title><description><![CDATA[<p dir="auto">As far as model is concerned you will need to implement rowCount(), data(), mapToSource() and mapFromSource().</p>
<p dir="auto">Also you will need to have a custom QFileDialog because it has to return multiple files when selected.</p>
]]></description><link>https://forum.qt.io/post/180444</link><guid isPermaLink="true">https://forum.qt.io/post/180444</guid><dc:creator><![CDATA[Santosh Reddy]]></dc:creator><pubDate>Sat, 25 May 2013 19:40:43 GMT</pubDate></item></channel></rss>