<?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[Stack widget setCurrentWidget does not change the widget]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">This is my full code in one of the function.</p>
<pre><code>m_centralStackedWidget-&gt;setCurrentWidget(m_windowSplitter);
m_showSidebarAction-&gt;setEnabled(true);
</code></pre>
<p dir="auto">There are two widgets being added to the central stacked widget.</p>
<ol>
<li>Welcomescreen (A QWidget) 2. QSplitter</li>
</ol>
<p dir="auto">When this function is triggered, the current widget of the m_centralStackedWidget<br />
did change to the m_windowSplitter. However, the welcome screen does not hide, and the m_windowSplitter does not show up.<br />
This is not an expected behavior. May I know if there is any rule for using this function?</p>
]]></description><link>https://forum.qt.io/topic/162466/stack-widget-setcurrentwidget-does-not-change-the-widget</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 00:05:10 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/162466.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 20 Jun 2025 07:07:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Stack widget setCurrentWidget does not change the widget on Fri, 20 Jun 2025 12:36:46 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">before using -&gt;setCurrentWidget(), you can check if that widget is already contained in that stack widget or not.</p>
<p dir="auto">you can m_centralStackedWidget-&gt;indexOf(m_windowSplitter) to find out if the widget is present in the stackwidget or not, it will return "-1" if the widget is not present in stackwidget</p>
]]></description><link>https://forum.qt.io/post/827897</link><guid isPermaLink="true">https://forum.qt.io/post/827897</guid><dc:creator><![CDATA[Jyothi]]></dc:creator><pubDate>Fri, 20 Jun 2025 12:36:46 GMT</pubDate></item><item><title><![CDATA[Reply to Stack widget setCurrentWidget does not change the widget on Fri, 20 Jun 2025 09:37:22 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">This is not enough code to fully understand your issue.</p>
<p dir="auto">Please provide a minimal compilable example that reproduces it.</p>
]]></description><link>https://forum.qt.io/post/827895</link><guid isPermaLink="true">https://forum.qt.io/post/827895</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Fri, 20 Jun 2025 09:37:22 GMT</pubDate></item></channel></rss>