<?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 does the UI have different user display modes]]></title><description><![CDATA[<p dir="auto">Hi, all<br />
I want to design some UIs for different users. Here is a simple example that can be switched by hiding some widgets. But there are also some relatively more complex UIs, which must be re-layout to achieve good results. I read some docs of qstackedwidget/qstacklayout, they are suitable for multiple pages, my UI is actually just one page.<br />
My idea is to create 2 layouts: normalLayout and superLayout, when the toggle button is clicked:<br />
for super mode:<br />
(1) clear normalLayout<br />
(2) re-layout superLayout<br />
(3) this-&gt;setLayout(superLayout)<br />
for normal mode:<br />
(1) clear superLayout<br />
(2) re-layout normalLayout<br />
(3) this-&gt;setLayout(normalLayout)<br />
I don’t know if this is too complicated. Could you give me some suggestions please?<br />
Best regards!</p>
<p dir="auto">Normal mode:<br />
<img src="https://i.loli.net/2021/11/18/xgjPTOWr4bcv7ea.png" alt="alt text" class=" img-fluid img-markdown" /><br />
Super mode:<br />
<img src="https://i.loli.net/2021/11/18/KkcZIuYf4To1O69.png" alt="alt text" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/topic/132098/how-does-the-ui-have-different-user-display-modes</link><generator>RSS for Node</generator><lastBuildDate>Thu, 06 Aug 2026 19:27:19 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/132098.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 Nov 2021 08:24:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How does the UI have different user display modes on Thu, 18 Nov 2021 08:37:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tovax">@<bdi>tovax</bdi></a> this sounds like a case for object inheritance</p>
<p dir="auto">make a base class with the normal mode,</p>
<p dir="auto">make a supermode class, that has the normal mode as base, and extend that.</p>
<p dir="auto">You won't be able to use the ygwys Designer effectively(at all) for the super class, so keep that in mind</p>
]]></description><link>https://forum.qt.io/post/690617</link><guid isPermaLink="true">https://forum.qt.io/post/690617</guid><dc:creator><![CDATA[J.Hilk]]></dc:creator><pubDate>Thu, 18 Nov 2021 08:37:44 GMT</pubDate></item><item><title><![CDATA[Reply to How does the UI have different user display modes on Fri, 19 Nov 2021 12:50:16 GMT]]></title><description><![CDATA[<p dir="auto">@J-Hilk Thank you for your patience , your idea solved my question.</p>
]]></description><link>https://forum.qt.io/post/690838</link><guid isPermaLink="true">https://forum.qt.io/post/690838</guid><dc:creator><![CDATA[tovax]]></dc:creator><pubDate>Fri, 19 Nov 2021 12:50:16 GMT</pubDate></item><item><title><![CDATA[Reply to How does the UI have different user display modes on Fri, 19 Nov 2021 09:59:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tovax">@<bdi>tovax</bdi></a> you fetch the layout from the base class, you may want to add a function for that, and add your child layout to the original one, as additional components,</p>
<p dir="auto">would my idea be</p>
]]></description><link>https://forum.qt.io/post/690812</link><guid isPermaLink="true">https://forum.qt.io/post/690812</guid><dc:creator><![CDATA[J.Hilk]]></dc:creator><pubDate>Fri, 19 Nov 2021 09:59:12 GMT</pubDate></item><item><title><![CDATA[Reply to How does the UI have different user display modes on Fri, 19 Nov 2021 09:53:51 GMT]]></title><description><![CDATA[<p dir="auto">@J-Hilk<br />
Excuse me, the parent class already has a layout, how to re-layout the child class?</p>
]]></description><link>https://forum.qt.io/post/690811</link><guid isPermaLink="true">https://forum.qt.io/post/690811</guid><dc:creator><![CDATA[tovax]]></dc:creator><pubDate>Fri, 19 Nov 2021 09:53:51 GMT</pubDate></item><item><title><![CDATA[Reply to How does the UI have different user display modes on Thu, 18 Nov 2021 12:09:20 GMT]]></title><description><![CDATA[<p dir="auto">@J-Hilk Hi, thank you very much for your answer! According to your advice on inheritance, I wrote NormalModeClass, which is inherited by SuperModeClass.<br />
<strong>You won't be able to use the ygwys Designer effectively(at all) for the super class, so keep that in mind</strong>. This sentence is very useful to me, thanks again.</p>
]]></description><link>https://forum.qt.io/post/690648</link><guid isPermaLink="true">https://forum.qt.io/post/690648</guid><dc:creator><![CDATA[tovax]]></dc:creator><pubDate>Thu, 18 Nov 2021 12:09:20 GMT</pubDate></item><item><title><![CDATA[Reply to How does the UI have different user display modes on Thu, 18 Nov 2021 08:37:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tovax">@<bdi>tovax</bdi></a> this sounds like a case for object inheritance</p>
<p dir="auto">make a base class with the normal mode,</p>
<p dir="auto">make a supermode class, that has the normal mode as base, and extend that.</p>
<p dir="auto">You won't be able to use the ygwys Designer effectively(at all) for the super class, so keep that in mind</p>
]]></description><link>https://forum.qt.io/post/690617</link><guid isPermaLink="true">https://forum.qt.io/post/690617</guid><dc:creator><![CDATA[J.Hilk]]></dc:creator><pubDate>Thu, 18 Nov 2021 08:37:44 GMT</pubDate></item></channel></rss>