<?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[modal dialog called from QAction does not close until action terminates]]></title><description><![CDATA[<p dir="auto">Under Qt5.9:</p>
<p dir="auto">A QAction <code>A</code> is connected to a MainWindow member function <code>f</code> that executes a QFileDialog <code>D</code>, then takes quite a while to load the selected files. Against my intentions, the file dialog remains open until <code>f</code> terminates. Calling <code>D.close()</code> does not help. Letting <code>D</code> go out of scope does not help.</p>
<p dir="auto">My best hypothesis right now is that the unexpected behavior of <code>D</code> in <code>f</code> has to do with <code>f</code> being called from a QAction. Is this plausible, or even a known problem?</p>
]]></description><link>https://forum.qt.io/topic/87309/modal-dialog-called-from-qaction-does-not-close-until-action-terminates</link><generator>RSS for Node</generator><lastBuildDate>Sat, 02 May 2026 11:43:12 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/87309.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 30 Jan 2018 14:27:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to modal dialog called from QAction does not close until action terminates on Tue, 30 Jan 2018 15:05:37 GMT]]></title><description><![CDATA[<p dir="auto">What helps is <code>mainwin-&gt;repaint()</code>.</p>
]]></description><link>https://forum.qt.io/post/439336</link><guid isPermaLink="true">https://forum.qt.io/post/439336</guid><dc:creator><![CDATA[Joachim W]]></dc:creator><pubDate>Tue, 30 Jan 2018 15:05:37 GMT</pubDate></item><item><title><![CDATA[Reply to modal dialog called from QAction does not close until action terminates on Tue, 30 Jan 2018 15:03:18 GMT]]></title><description><![CDATA[<p dir="auto">can you please show your code?</p>
]]></description><link>https://forum.qt.io/post/439334</link><guid isPermaLink="true">https://forum.qt.io/post/439334</guid><dc:creator><![CDATA[VRonin]]></dc:creator><pubDate>Tue, 30 Jan 2018 15:03:18 GMT</pubDate></item><item><title><![CDATA[Reply to modal dialog called from QAction does not close until action terminates on Tue, 30 Jan 2018 14:55:45 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);</p>
</blockquote>
<p dir="auto">has no effect, the problem persists.</p>
<p dir="auto">Anyway, I was wrong about QAction. The problem also persists if I directly call <code>mainwin-&gt;f</code>.</p>
]]></description><link>https://forum.qt.io/post/439332</link><guid isPermaLink="true">https://forum.qt.io/post/439332</guid><dc:creator><![CDATA[Joachim W]]></dc:creator><pubDate>Tue, 30 Jan 2018 14:55:45 GMT</pubDate></item><item><title><![CDATA[Reply to modal dialog called from QAction does not close until action terminates on Tue, 30 Jan 2018 14:38:05 GMT]]></title><description><![CDATA[<p dir="auto">Add <code>QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);</code> after <code>D.close()</code></p>
]]></description><link>https://forum.qt.io/post/439331</link><guid isPermaLink="true">https://forum.qt.io/post/439331</guid><dc:creator><![CDATA[VRonin]]></dc:creator><pubDate>Tue, 30 Jan 2018 14:38:05 GMT</pubDate></item></channel></rss>