<?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[Qml Menu]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">I am using qml menu in my project, based on  mouse click i am poping up the menu. I want my menu to popup exactly at bottom or left of an item, which is placed at the top right corner of my application window. how can i do that? can anyone suggest me the possible solution.<br />
Thanks</p>
]]></description><link>https://forum.qt.io/topic/80123/qml-menu</link><generator>RSS for Node</generator><lastBuildDate>Thu, 24 Sep 2026 18:53:41 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/80123.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 09 Jun 2017 08:41:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Qml Menu on Mon, 12 Jun 2017 08:58:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/p3c0">@<bdi>p3c0</bdi></a> Ok sir thank you. it helped me alot.</p>
]]></description><link>https://forum.qt.io/post/398916</link><guid isPermaLink="true">https://forum.qt.io/post/398916</guid><dc:creator><![CDATA[Naveen_D]]></dc:creator><pubDate>Mon, 12 Jun 2017 08:58:29 GMT</pubDate></item><item><title><![CDATA[Reply to Qml Menu on Mon, 12 Jun 2017 07:22:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/naveen_d">@<bdi>Naveen_D</bdi></a> Yes you are right. It doesn't seem to work (I also tried by using MenuStyle). This only makes me think that since this is a private function (those which are not made public yet) it is not fully functional and they may also remove it from future releases. So for now you will need to continue as it is or switch to newer QQC2.</p>
]]></description><link>https://forum.qt.io/post/398899</link><guid isPermaLink="true">https://forum.qt.io/post/398899</guid><dc:creator><![CDATA[p3c0]]></dc:creator><pubDate>Mon, 12 Jun 2017 07:22:24 GMT</pubDate></item><item><title><![CDATA[Reply to Qml Menu on Mon, 12 Jun 2017 06:45:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/p3c0">@<bdi>p3c0</bdi></a> When i try to increase the height in the Qt.Rect, i.e<br />
settingsMenu.__popup(Qt.rect(settingsimgrect.x, settingsimgrect.height,0,30),0,0)<br />
instead of <strong>settingsimgrect.height</strong> if i give some other value, Menu frame height is not increased, but the height between the menu popup and the rectangle is increased. the changes what i am doing are correct ? if there is any mistake pls rectify. Thanks</p>
]]></description><link>https://forum.qt.io/post/398890</link><guid isPermaLink="true">https://forum.qt.io/post/398890</guid><dc:creator><![CDATA[Naveen_D]]></dc:creator><pubDate>Mon, 12 Jun 2017 06:45:06 GMT</pubDate></item><item><title><![CDATA[Reply to Qml Menu on Mon, 12 Jun 2017 06:24:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/naveen_d">@<bdi>Naveen_D</bdi></a> I think it should be possible with the QRect.</p>
]]></description><link>https://forum.qt.io/post/398886</link><guid isPermaLink="true">https://forum.qt.io/post/398886</guid><dc:creator><![CDATA[p3c0]]></dc:creator><pubDate>Mon, 12 Jun 2017 06:24:15 GMT</pubDate></item><item><title><![CDATA[Reply to Qml Menu on Mon, 12 Jun 2017 06:12:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/p3c0">@<bdi>p3c0</bdi></a> Thanks for the information,one more question, Can i increase the height of the menu frame?</p>
]]></description><link>https://forum.qt.io/post/398878</link><guid isPermaLink="true">https://forum.qt.io/post/398878</guid><dc:creator><![CDATA[Naveen_D]]></dc:creator><pubDate>Mon, 12 Jun 2017 06:12:41 GMT</pubDate></item><item><title><![CDATA[Reply to Qml Menu on Mon, 12 Jun 2017 06:04:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/naveen_d">@<bdi>Naveen_D</bdi></a> Glad that it worked. The first argument which takes <code>QRect</code> is used to specify the position of the menu frame. AFAIK the second i.e <code>atItemIndex</code> can be used to position the menu at that particular menu index whereas the third i.e <code>menuType</code> can be used to specify its types viz. <code>DefaultMenu</code> and <code>EditMenu</code>.<br />
Almost all of the times 2nd and 3rd should be 0.</p>
]]></description><link>https://forum.qt.io/post/398875</link><guid isPermaLink="true">https://forum.qt.io/post/398875</guid><dc:creator><![CDATA[p3c0]]></dc:creator><pubDate>Mon, 12 Jun 2017 06:04:26 GMT</pubDate></item><item><title><![CDATA[Reply to Qml Menu on Mon, 12 Jun 2017 05:22:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/p3c0">@<bdi>p3c0</bdi></a> Thank you, can i know what are those arguments inside the brackets ?<br />
i am able to place the menu below the rectangle.</p>
]]></description><link>https://forum.qt.io/post/398867</link><guid isPermaLink="true">https://forum.qt.io/post/398867</guid><dc:creator><![CDATA[Naveen_D]]></dc:creator><pubDate>Mon, 12 Jun 2017 05:22:37 GMT</pubDate></item><item><title><![CDATA[Reply to Qml Menu on Fri, 09 Jun 2017 09:12:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/naveen_d">@<bdi>Naveen_D</bdi></a> Yes it is the only option with that version. Try this:</p>
<pre><code>import QtQuick 2.6
import QtQuick.Controls 1.4

Item {
    width: 500
    height: 500

    Menu {
        id: menu

        MenuItem {
            text: "New..."
        }
        MenuItem {
            text: "Open..."
        }
        MenuItem {
            text: "Exit"
        }
    }

    Button {
        id: btn
        text: "Click"
        anchors.right: parent.right
        onClicked: menu.__popup(Qt.rect(btn.x, btn.height, 0, 0), 0, 0)
    }
}
</code></pre>
]]></description><link>https://forum.qt.io/post/398449</link><guid isPermaLink="true">https://forum.qt.io/post/398449</guid><dc:creator><![CDATA[p3c0]]></dc:creator><pubDate>Fri, 09 Jun 2017 09:12:12 GMT</pubDate></item><item><title><![CDATA[Reply to Qml Menu on Fri, 09 Jun 2017 09:07:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/p3c0">@<bdi>p3c0</bdi></a> then i have to try with that, how can i use that ?</p>
]]></description><link>https://forum.qt.io/post/398445</link><guid isPermaLink="true">https://forum.qt.io/post/398445</guid><dc:creator><![CDATA[Naveen_D]]></dc:creator><pubDate>Fri, 09 Jun 2017 09:07:53 GMT</pubDate></item><item><title><![CDATA[Reply to Qml Menu on Fri, 09 Jun 2017 09:03:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/naveen_d">@<bdi>Naveen_D</bdi></a> Well then the only option is to use the private function <code>__popup</code>.</p>
]]></description><link>https://forum.qt.io/post/398440</link><guid isPermaLink="true">https://forum.qt.io/post/398440</guid><dc:creator><![CDATA[p3c0]]></dc:creator><pubDate>Fri, 09 Jun 2017 09:03:14 GMT</pubDate></item><item><title><![CDATA[Reply to Qml Menu on Fri, 09 Jun 2017 08:54:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/p3c0">@<bdi>p3c0</bdi></a> Sir i am using Qt 5.6, sorry forgot to mention. i tried with x, for that i need to import QtQuick.controls 2</p>
]]></description><link>https://forum.qt.io/post/398432</link><guid isPermaLink="true">https://forum.qt.io/post/398432</guid><dc:creator><![CDATA[Naveen_D]]></dc:creator><pubDate>Fri, 09 Jun 2017 08:54:05 GMT</pubDate></item><item><title><![CDATA[Reply to Qml Menu on Fri, 09 Jun 2017 08:52:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/naveen_d">@<bdi>Naveen_D</bdi></a> See this example <a href="https://doc.qt.io/qt-5/qml-qtquick-controls2-menu.html#details" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>. Just set the <code>x</code> position in addition to it.</p>
]]></description><link>https://forum.qt.io/post/398428</link><guid isPermaLink="true">https://forum.qt.io/post/398428</guid><dc:creator><![CDATA[p3c0]]></dc:creator><pubDate>Fri, 09 Jun 2017 08:52:07 GMT</pubDate></item></channel></rss>