<?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[QWidgetAction show error]]></title><description><![CDATA[<p dir="auto">Hello!</p>
<p dir="auto">I have created a custom widget to show it when I open a QMenu inside a QPushButton. This is the widget:</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/1c59e169-4ac3-44d2-ba4b-77c2ccff1989.png" alt="f9fa4f3f-a294-4548-95fe-6c5f7c8374d2-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">When I open it with the QPushButton, it appears at follows:</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/5ed5321a-db98-4360-b15a-4b50df8c4783.png" alt="4712a0db-b1bf-4955-bf23-766beb0f6071-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I don't know why it changes the widgets order and why the down arrow appears in the left side.</p>
<p dir="auto">This is my code:</p>
<pre><code>    QMenu *menu = new QMenu(ui-&gt;buttonReports);
    ui-&gt;buttonReports-&gt;setMenu(menu);
    WidgetReports *wReports = new WidgetReports(menu);
    QWidgetAction *wAction = new QWidgetAction(menu);
    wAction-&gt;setDefaultWidget(wReports);
    menu-&gt;addAction(wAction);
</code></pre>
<p dir="auto">What am I doing wrong?</p>
<p dir="auto">Thank you very much!</p>
]]></description><link>https://forum.qt.io/topic/135345/qwidgetaction-show-error</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 00:04:59 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/135345.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 28 Mar 2022 11:42:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QWidgetAction show error on Mon, 28 Mar 2022 13:38:15 GMT]]></title><description><![CDATA[<p dir="auto">Yeah! It was because the button. I had it right to left so the menu was showed right to left too.  Damn copy and paste...</p>
<p dir="auto">Thank you very much!</p>
]]></description><link>https://forum.qt.io/post/707951</link><guid isPermaLink="true">https://forum.qt.io/post/707951</guid><dc:creator><![CDATA[ivanicy]]></dc:creator><pubDate>Mon, 28 Mar 2022 13:38:15 GMT</pubDate></item><item><title><![CDATA[Reply to QWidgetAction show error on Mon, 28 Mar 2022 13:09:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ivanicy">@<bdi>ivanicy</bdi></a><br />
Check the layoutDirection property value of your custom widget in the Designer, seems to be set to right to left.<br />
But, if it was the case, it should look inverted as well in the Designer itself.<br />
Strange...</p>
]]></description><link>https://forum.qt.io/post/707944</link><guid isPermaLink="true">https://forum.qt.io/post/707944</guid><dc:creator><![CDATA[mpergand]]></dc:creator><pubDate>Mon, 28 Mar 2022 13:09:29 GMT</pubDate></item></channel></rss>