<?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[QMenus cannot be directly clicked.]]></title><description><![CDATA[<p dir="auto">I'm writing a desktop app on Linux.  The app has to have similar look and feel to an old BX Pro app written for IBM AIX.  There is a menu at the top, with several menus at the top left, and the help menu is at the top right.  I'm using menuBar()-&gt;addMenu(&lt;File, Tools, View&gt;); for each of the three left menus.  I create a separate menuBar, set it as the corner widget (top right) and add the help menu to that bar.  My problem is a sequence issue.  I cannot click on the File menu directly.  I have to click on the View menu, then slide across to the File menu.  From there, I can select the item I want.</p>
<p dir="auto">I have methods for the creation of each QMenu and it's contents/submenus.  Then I have a method to put each of the QMenus in the menubar.  I cannot copy the code here, as it's on a classified system (DOD work).  However, the  text below should give you the idea (nothing classified):</p>
<p dir="auto">void &lt;class&gt;::createFileMenu()  // others similar<br />
{<br />
fileMenu = new QMenu("&amp;File");<br />
newCommMenu = fileMenu-&gt;addMenu("&amp;New Comm");<br />
createNewCommMenu();<br />
loadAction = fileMenu-&gt;addAction("&amp;Load");<br />
saveAction = fileMenu-&gt;addAction("&amp;Save");<br />
exitAction = fileMenu-&gt;addAction("E&amp;xit");<br />
}</p>
<p dir="auto">// Other menus created similarly</p>
<p dir="auto">void &lt;class&gt;::createMenuBars()<br />
{<br />
menuBar()-&gt;addMenu(fileMenu);<br />
menuBar()-&gt;addMenu(toolsMenu);<br />
menuBar()-&gt;addMenu(viewMenu);</p>
<pre><code> helpMenuBar = new QMenuBar(menuBar());
 helpMenuBar-&gt;addMenu(helpMenu);
 menuBar()-&gt;setCornerWidget(helpMenuBar);
</code></pre>
<p dir="auto">}</p>
<p dir="auto">The menu bar looks sort of like this, with F, T, V, and H being underscored:</p>
<hr />
<p dir="auto">File   Tools   View                                                                                                                                              Help</p>
<hr />
<p dir="auto">I can successfully click on View or Help, but to get to Tool or File, I have to click on View and slide across to<br />
the menu I want.  I can directly access File or Tools with &lt;alt&gt;F or &lt;alt&gt;T.</p>
<p dir="auto">I'm fairly new to QT, so any help appreciated.  Thanks in advance.<br />
Eric</p>
]]></description><link>https://forum.qt.io/topic/118979/qmenus-cannot-be-directly-clicked</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Apr 2026 05:02:51 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/118979.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Sep 2020 20:00:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QMenus cannot be directly clicked. on Mon, 14 Sep 2020 20:32:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eric_lund">@<bdi>Eric_Lund</bdi></a></p>
<p dir="auto">OK, the help menu should have been out to the far right.  It was when I typed it. :-)</p>
]]></description><link>https://forum.qt.io/post/617126</link><guid isPermaLink="true">https://forum.qt.io/post/617126</guid><dc:creator><![CDATA[Eric_Lund]]></dc:creator><pubDate>Mon, 14 Sep 2020 20:32:56 GMT</pubDate></item></channel></rss>