<?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[Hide Menu Items in QML]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I had my gui with menu items like file,tools,settings etc.<br />
I want to hide one of the menuitem in that, so how to hide it.</p>
<p dir="auto">Please give me the solution.</p>
<p dir="auto">Thanks in advance</p>
]]></description><link>https://forum.qt.io/topic/81001/hide-menu-items-in-qml</link><generator>RSS for Node</generator><lastBuildDate>Sun, 10 May 2026 10:09:39 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/81001.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 05 Jul 2017 09:19:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hide Menu Items in QML on Fri, 07 Jul 2017 05:39:22 GMT]]></title><description><![CDATA[<p dir="auto">Hi pradeep,</p>
<p dir="auto">Thanku for your answer, its very helpful.</p>
]]></description><link>https://forum.qt.io/post/403543</link><guid isPermaLink="true">https://forum.qt.io/post/403543</guid><dc:creator><![CDATA[DivyaMuthyala]]></dc:creator><pubDate>Fri, 07 Jul 2017 05:39:22 GMT</pubDate></item><item><title><![CDATA[Reply to Hide Menu Items in QML on Thu, 06 Jul 2017 14:24:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/divyamuthyala">@<bdi>DivyaMuthyala</bdi></a><br />
MenuItems do have visible property which you can set based on your requirement.</p>
<pre><code>menuBar: MenuBar {
    Menu {
        title: qsTr("File")
        MenuItem { text: qsTr("&amp;Open"); visible: false }
        MenuItem { text: qsTr("Exit"); visible: false }
    }
}
</code></pre>
]]></description><link>https://forum.qt.io/post/403462</link><guid isPermaLink="true">https://forum.qt.io/post/403462</guid><dc:creator><![CDATA[Pradeep P N]]></dc:creator><pubDate>Thu, 06 Jul 2017 14:24:40 GMT</pubDate></item><item><title><![CDATA[Reply to Hide Menu Items in QML on Thu, 06 Jul 2017 06:34:43 GMT]]></title><description><![CDATA[<p dir="auto">Qt Quick Controls 2 Menu presents its items using a ListView from Qt Quick, which unfortunately doesn't support hiding items. As a workaround, the height of a hidden list item can be set to 0, though.</p>
]]></description><link>https://forum.qt.io/post/403330</link><guid isPermaLink="true">https://forum.qt.io/post/403330</guid><dc:creator><![CDATA[jpnurmi]]></dc:creator><pubDate>Thu, 06 Jul 2017 06:34:43 GMT</pubDate></item><item><title><![CDATA[Reply to Hide Menu Items in QML on Wed, 05 Jul 2017 20:53:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/divyamuthyala">@<bdi>DivyaMuthyala</bdi></a> I only worked with QtQuickControls2 MenuItems.<br />
You cannot make the MenuItiem invisible.<br />
I have some situations, where Menus are created dynamically (depends from context and user-policies / rights)<br />
thx to a tip <a class="plugin-mentions-user plugin-mentions-a" href="/user/jpnurmi">@<bdi>jpnurmi</bdi></a> I manage this with a Repeater.<br />
Use a data model with text and a ID - then you can create the MenuItem from the model and onTriggered(){if id == 42 doSomething(), ...}<br />
Hope this gives you an idea<br />
Menu {   Repeater { .... } }</p>
]]></description><link>https://forum.qt.io/post/403278</link><guid isPermaLink="true">https://forum.qt.io/post/403278</guid><dc:creator><![CDATA[ekkescorner]]></dc:creator><pubDate>Wed, 05 Jul 2017 20:53:04 GMT</pubDate></item></channel></rss>