<?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[Application hung after dialog opened during startup on macOS]]></title><description><![CDATA[<p dir="auto">My application's main contains:</p>
<pre><code>		deleteRemainingTempFiles();
		mainWindow.show();
</code></pre>
<p dir="auto">if the dialog in deleteRemainingTempFiles() is displayed on macOS, then the application is unresponsive after clicking on "Yes".<br />
Here's what's in deleteRemainingTempFiles()</p>
<pre><code>	void	deleteRemainingTempFiles()
	{
		ZFUNCTRACE_RUNTIME();
		std::vector&lt;QString&gt; vFiles;
		qint64	totalSize = 0;

		QString folder(CAllStackingTasks::GetTemporaryFilesFolder());

		QStringList nameFilters("DSS*.tmp");

		QDir dir(folder);
		dir.setNameFilters(nameFilters);

		for (QFileInfo item : dir.entryInfoList())
		{
			if (item.isFile())
			{
				vFiles.emplace_back(item.absoluteFilePath());
				totalSize += item.size();
			}
		}

		if (!vFiles.empty())
		{
			QString			strMsg;
			QString			strSize;

			ZTRACE_RUNTIME("Remove remaining %d temp files", vFiles.size());

			SpaceToQString(totalSize, strSize);

			strMsg = QString("One or more temporary files created by DeepSkyStacker are still in the working directory."
				"\n\nDo you want to remove them?\n\n(%1 file(s) using %2)")
				.arg(vFiles.size()).arg(strSize);

			QMessageBox msgBox(QMessageBox::Question, QString(""), strMsg, (QMessageBox::Yes | QMessageBox::No));

			msgBox.setDefaultButton(QMessageBox::Yes);

			if (QMessageBox::Yes == msgBox.exec())
			{
				QFile file;
				for (size_t i = 0; i &lt; vFiles.size(); i++)
				{
					file.setFileName(vFiles[i]);
					file.remove();
				}
			};

		};


	};
</code></pre>
<p dir="auto">What am I doing wrong, and what do I need to do to fix this?</p>
<p dir="auto">Thanks, David</p>
]]></description><link>https://forum.qt.io/topic/164422/application-hung-after-dialog-opened-during-startup-on-macos</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 19:54:56 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/164422.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 12 Mar 2026 12:08:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Application hung after dialog opened during startup on macOS on Fri, 13 Mar 2026 18:34:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/perdrix">@<bdi>Perdrix</bdi></a> said in <a href="/post/837067">Application hung after dialog opened during startup on macOS</a>:</p>
<blockquote>
<p dir="auto">Hmmm Should I set that QMessageBox to be "application modal"?</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/perdrix">@<bdi>Perdrix</bdi></a> As I understand your flow, yes, the dialog should be modal since it is first and exclusive before doing mainwindow processing.</p>
]]></description><link>https://forum.qt.io/post/837084</link><guid isPermaLink="true">https://forum.qt.io/post/837084</guid><dc:creator><![CDATA[Kent-Dorfman]]></dc:creator><pubDate>Fri, 13 Mar 2026 18:34:50 GMT</pubDate></item><item><title><![CDATA[Reply to Application hung after dialog opened during startup on macOS on Fri, 13 Mar 2026 09:14:01 GMT]]></title><description><![CDATA[<p dir="auto">Hmmm I can't recreate the problem - I was running under the debugger at the time I hit it.  Perhaps that might explain it.</p>
]]></description><link>https://forum.qt.io/post/837068</link><guid isPermaLink="true">https://forum.qt.io/post/837068</guid><dc:creator><![CDATA[Perdrix]]></dc:creator><pubDate>Fri, 13 Mar 2026 09:14:01 GMT</pubDate></item><item><title><![CDATA[Reply to Application hung after dialog opened during startup on macOS on Fri, 13 Mar 2026 09:01:57 GMT]]></title><description><![CDATA[<p dir="auto">Hmmm Should I set that QMessageBox to be "application modal"?</p>
]]></description><link>https://forum.qt.io/post/837067</link><guid isPermaLink="true">https://forum.qt.io/post/837067</guid><dc:creator><![CDATA[Perdrix]]></dc:creator><pubDate>Fri, 13 Mar 2026 09:01:57 GMT</pubDate></item><item><title><![CDATA[Reply to Application hung after dialog opened during startup on macOS on Fri, 13 Mar 2026 09:14:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/j.hilk">@<bdi>J.Hilk</bdi></a> Yes, most certainly.  QCoreApplication instance is created over a 100 lines earlier.<br />
app.exec() is called immediately after mainWindow.show().</p>
<p dir="auto"><s>The main window is fully displayed while that dialog is running.  So it almost seems that the dlg operates asynchronously.</s></p>
]]></description><link>https://forum.qt.io/post/837066</link><guid isPermaLink="true">https://forum.qt.io/post/837066</guid><dc:creator><![CDATA[Perdrix]]></dc:creator><pubDate>Fri, 13 Mar 2026 09:14:15 GMT</pubDate></item><item><title><![CDATA[Reply to Application hung after dialog opened during startup on macOS on Fri, 13 Mar 2026 08:34:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/perdrix">@<bdi>Perdrix</bdi></a> QMessageBox::exec()  does run its own event loop, but your call to deleteRemainingTempFiles is after the creation of Q(Core)Application?</p>
]]></description><link>https://forum.qt.io/post/837065</link><guid isPermaLink="true">https://forum.qt.io/post/837065</guid><dc:creator><![CDATA[J.Hilk]]></dc:creator><pubDate>Fri, 13 Mar 2026 08:34:53 GMT</pubDate></item><item><title><![CDATA[Reply to Application hung after dialog opened during startup on macOS on Fri, 13 Mar 2026 08:10:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Qt 6.10, macOS Tahoe 26.3.1.<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/user/kent-dorfman">@<bdi>Kent-Dorfman</bdi></a> AFAIK, and I could be wrong, QMessageBox::exec() runs it own local event loop.</p>
]]></description><link>https://forum.qt.io/post/837064</link><guid isPermaLink="true">https://forum.qt.io/post/837064</guid><dc:creator><![CDATA[Perdrix]]></dc:creator><pubDate>Fri, 13 Mar 2026 08:10:59 GMT</pubDate></item><item><title><![CDATA[Reply to Application hung after dialog opened during startup on macOS on Thu, 12 Mar 2026 20:10:07 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Which version of Qt are you using ?<br />
On which version of macOS ?</p>
]]></description><link>https://forum.qt.io/post/837057</link><guid isPermaLink="true">https://forum.qt.io/post/837057</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 12 Mar 2026 20:10:07 GMT</pubDate></item><item><title><![CDATA[Reply to Application hung after dialog opened during startup on macOS on Thu, 12 Mar 2026 19:18:16 GMT]]></title><description><![CDATA[<p dir="auto">IIRC, ALL Qt apps have to actually start the event loop running with a call to exec().</p>
]]></description><link>https://forum.qt.io/post/837051</link><guid isPermaLink="true">https://forum.qt.io/post/837051</guid><dc:creator><![CDATA[Kent-Dorfman]]></dc:creator><pubDate>Thu, 12 Mar 2026 19:18:16 GMT</pubDate></item></channel></rss>