<?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 design a beatiful filedialog object?]]></title><description><![CDATA[<p dir="auto">I used the QFileDialog code below.<br />
I want to choose the file and the path at the same time.But the code seems runed unnormally.The dialog is very ugly cause I used the setOption function,howto do ?By using the qstyle ?<br />
and by the way,the choose button of the dialog cant work when i choosed the files or paths.I dont know why.</p>
<pre><code>QFileDialog* _f_dlg =new QFileDialog() ;
_f_dlg-&gt;setFileMode(QFileDialog::Directory);
_f_dlg-&gt;setOption(QFileDialog::DontUseNativeDialog, true);
</code></pre>
]]></description><link>https://forum.qt.io/topic/145806/how-to-design-a-beatiful-filedialog-object</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 04:07:33 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/145806.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Jun 2023 00:39:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to design a beatiful filedialog object? on Fri, 16 Jun 2023 07:38:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nicker-player">@<bdi>nicker-player</bdi></a></p>
<blockquote>
<p dir="auto">So how to choose the files and the paths at the same time</p>
</blockquote>
<p dir="auto">I already said:<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> said in <a href="/post/761641">How to design a beatiful filedialog object?</a>:</p>
<blockquote>
<p dir="auto">you cannot choose a file here, only a directory/folder</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nicker-player">@<bdi>nicker-player</bdi></a> said in <a href="/post/761651">How to design a beatiful filedialog object?</a>:</p>
<blockquote>
<p dir="auto">And the dialog looks normally and not ugly.</p>
</blockquote>
<p dir="auto">You read what <a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> wrote.  Why do you not act on it rather than ignoring it?</p>
]]></description><link>https://forum.qt.io/post/761652</link><guid isPermaLink="true">https://forum.qt.io/post/761652</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Fri, 16 Jun 2023 07:38:04 GMT</pubDate></item><item><title><![CDATA[Reply to How to design a beatiful filedialog object? on Fri, 16 Jun 2023 07:30:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a><br />
In fact ,heres the code Ive used.<br />
So how to choose the files and the paths at the same time.And the dialog looks normally and not ugly.</p>
<pre><code> QFileDialog* _f_dlg = this;
_f_dlg-&gt;setFileMode(QFileDialog::Directory);
 _f_dlg-&gt;setOption(QFileDialog::DontUseNativeDialog, true);
QListView *l = _f_dlg-&gt;findChild&lt;QListView*&gt;("listView");
if (l) {
        l-&gt;setSelectionMode(QAbstractItemView::MultiSelection);
}
QTreeView *t = _f_dlg-&gt;findChild&lt;QTreeView*&gt;();
if (t) {
        t-&gt;setSelectionMode(QAbstractItemView::MultiSelection);
}
</code></pre>
]]></description><link>https://forum.qt.io/post/761651</link><guid isPermaLink="true">https://forum.qt.io/post/761651</guid><dc:creator><![CDATA[nicker player]]></dc:creator><pubDate>Fri, 16 Jun 2023 07:30:48 GMT</pubDate></item><item><title><![CDATA[Reply to How to design a beatiful filedialog object? on Fri, 16 Jun 2023 06:23:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nicker-player">@<bdi>nicker-player</bdi></a> said in <a href="/post/761629">How to design a beatiful filedialog object?</a>:</p>
<blockquote>
<p dir="auto">I want to choose the file and the path at the same time</p>
</blockquote>
<p dir="auto">In addition to <a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a>'s comment, you cannot choose a <em>file</em> here, only a directory/folder.  I would actually expect the dialog to show only directories, not files.</p>
]]></description><link>https://forum.qt.io/post/761641</link><guid isPermaLink="true">https://forum.qt.io/post/761641</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Fri, 16 Jun 2023 06:23:00 GMT</pubDate></item><item><title><![CDATA[Reply to How to design a beatiful filedialog object? on Fri, 16 Jun 2023 05:16:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nicker-player">@<bdi>nicker-player</bdi></a> said in <a href="/post/761629">How to design a beatiful filedialog object?</a>:</p>
<blockquote>
<p dir="auto">cause I used the setOption function</p>
</blockquote>
<p dir="auto">Why do you set QFileDialog::DontUseNativeDialog?</p>
]]></description><link>https://forum.qt.io/post/761637</link><guid isPermaLink="true">https://forum.qt.io/post/761637</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Fri, 16 Jun 2023 05:16:33 GMT</pubDate></item></channel></rss>