<?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[static function and qsettings]]></title><description><![CDATA[<p dir="auto">in my app, in one class i save some settings using <em><strong>QSetting</strong></em>. in another class i have a static member and a static setter function for it which i call in the constructor of this latter class (that has this static member). however, i set the value based on a setting read from the other class i mentioned above. can i be sure that the setting was read before i'm setting the value with the static function? or how can i ensure that?</p>
]]></description><link>https://forum.qt.io/topic/83991/static-function-and-qsettings</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 01:40:06 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/83991.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 08 Oct 2017 11:31:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to static function and qsettings on Sun, 08 Oct 2017 13:08:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/koahnig">@<bdi>koahnig</bdi></a></p>
<p dir="auto">okay, i got it, i'll call it. so, that will ensure that settings are loaded before calling the static function?</p>
]]></description><link>https://forum.qt.io/post/419419</link><guid isPermaLink="true">https://forum.qt.io/post/419419</guid><dc:creator><![CDATA[user4592357]]></dc:creator><pubDate>Sun, 08 Oct 2017 13:08:03 GMT</pubDate></item><item><title><![CDATA[Reply to static function and qsettings on Sun, 08 Oct 2017 12:51:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/user4592357">@<bdi>user4592357</bdi></a></p>
<p dir="auto">It actually says:<br />
<em>This function is called automatically from QSettings's destructor and by the event loop at regular intervals, so you normally don't need to call it yourself.</em></p>
<p dir="auto">Therefore, I would suggest to call it. It will not hurt.</p>
<p dir="auto">If the destructor is actually called in your case, you are the only one able to answer. The case with the regular calls by the event loop leaves evetuallities open, but the intetional call will make sure that the routine is called.</p>
]]></description><link>https://forum.qt.io/post/419416</link><guid isPermaLink="true">https://forum.qt.io/post/419416</guid><dc:creator><![CDATA[koahnig]]></dc:creator><pubDate>Sun, 08 Oct 2017 12:51:52 GMT</pubDate></item><item><title><![CDATA[Reply to static function and qsettings on Sun, 08 Oct 2017 12:39:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/koahnig">@<bdi>koahnig</bdi></a></p>
<p dir="auto">no i didn't use that. the docs says it's called automatically so why do i need to call it? should i, anyways?</p>
]]></description><link>https://forum.qt.io/post/419415</link><guid isPermaLink="true">https://forum.qt.io/post/419415</guid><dc:creator><![CDATA[user4592357]]></dc:creator><pubDate>Sun, 08 Oct 2017 12:39:24 GMT</pubDate></item><item><title><![CDATA[Reply to static function and qsettings on Sun, 08 Oct 2017 12:33:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/user4592357">@<bdi>user4592357</bdi></a></p>
<p dir="auto">Did you use <a href="http://doc.qt.io/qt-5/qsettings.html#sync" target="_blank" rel="noopener noreferrer nofollow ugc">QSettings sync?</a></p>
]]></description><link>https://forum.qt.io/post/419413</link><guid isPermaLink="true">https://forum.qt.io/post/419413</guid><dc:creator><![CDATA[koahnig]]></dc:creator><pubDate>Sun, 08 Oct 2017 12:33:41 GMT</pubDate></item></channel></rss>