<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi<div class=""><br class=""></div><div class="">Think I found out some more. </div><div class=""><br class=""></div><div class="">To rule out a programming error on my part (bering new to Qt) I only looked at the menus.py example (Qt/examples/mainwindows/menus.py). </div><div class=""><br class=""></div><div class="">The relevant menu definition sections is like this:</div><div class=""><br class=""></div><div class=""><pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'Menlo';font-size:10.5pt;" class=""><span style="color:#cc7832;font-weight:bold;" class="">def </span><span style="font-weight:bold;" class="">createMenus</span>(<span style="color:#94558d;" class="">self</span>):<br class=""> <span style="color:#94558d;" class="">self</span>.fileMenu = <span style="color:#94558d;" class="">self</span>.menuBar().addMenu(<span style="color:#008080;" class="">"&File"</span>)<br class=""> <span style="color:#94558d;" class="">self</span>.fileMenu.addAction(<span style="color:#94558d;" class="">self</span>.newAct)<br class=""> <span style="color:#94558d;" class="">self</span>.fileMenu.addAction(<span style="color:#94558d;" class="">self</span>.openAct)<br class=""> <span style="color:#94558d;" class="">self</span>.fileMenu.addAction(<span style="color:#94558d;" class="">self</span>.saveAct)<br class=""> <span style="color:#94558d;" class="">self</span>.fileMenu.addAction(<span style="color:#94558d;" class="">self</span>.printAct)<br class=""> <span style="color:#94558d;" class="">self</span>.fileMenu.addSeparator()<br class=""> <span style="color:#94558d;" class="">self</span>.fileMenu.addAction(<span style="color:#94558d;" class="">self</span>.exitAct)<br class=""><br class=""> <span style="color:#94558d;" class="">self</span>.editMenu = <span style="color:#94558d;" class="">self</span>.menuBar().addMenu(<span style="color:#008080;" class="">"&Edit"</span>)<br class=""> <span style="color:#94558d;" class="">self</span>.editMenu.addAction(<span style="color:#94558d;" class="">self</span>.undoAct)<br class=""> <span style="color:#94558d;" class="">self</span>.editMenu.addAction(<span style="color:#94558d;" class="">self</span>.redoAct)<br class=""> <span style="color:#94558d;" class="">self</span>.editMenu.addSeparator()<br class=""> <span style="color:#94558d;" class="">self</span>.editMenu.addAction(<span style="color:#94558d;" class="">self</span>.cutAct)<br class=""> <span style="color:#94558d;" class="">self</span>.editMenu.addAction(<span style="color:#94558d;" class="">self</span>.copyAct)<br class=""> <span style="color:#94558d;" class="">self</span>.editMenu.addAction(<span style="color:#94558d;" class="">self</span>.pasteAct)<br class=""> <span style="color:#94558d;" class="">self</span>.editMenu.addSeparator()<br class=""></pre><div class=""><br class=""></div></div><div class="">So, since it uses self.menuBar() it should not be compatible with the system menu on OSX, since it does not use QMenuBar(). </div><div class=""><br class=""></div><div class="">Wat I found out that is that when I run the program the menu is visible but unclickable (as reported earlier). However, when I switch to some other program and then back to the menus.py program the menu works!</div><div class="">Looks like a bug to me.</div><div class=""><br class=""></div><div class="">Marcel </div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 05 Jun 2016, at 18:42, David Cortesi <<a href="mailto:davecortesi@gmail.com" class="">davecortesi@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class="">I have a PyQt5 app that works well in Mac OS, Linux and Windows. The only difference I see in the setup of my QMainWindow is this:<br class=""><br class=""> import platform<br class=""> if platform.uname().system.startswith('Darw') :<br class=""> self._menu_bar = QMenuBar() # parentless menu bar for Mac OS<br class=""> else :<br class=""> self._menu_bar = self.menuBar() # refer to the default one<br class=""><br class=""></div>and then it proceeds to initialize self._menu_bar with menus, e.g.<br class=""><br class=""> self.file_menu = self._menu_bar.addMenu(_TR('Menu name', '&File'))<br class=""> work = self.file_menu.addAction( _TR('File menu command','&New') )<br class=""> work.setShortcut(QKeySequence.New)<br class=""> work.setToolTip( _TR('File:New tooltip','Create a new, empty document') )<br class=""> work.triggered.connect(self._new)<br class=""><br class=""></div>and so forth. The above test of platform.uname() is about the only platform difference in the whole app...<br class=""></div>
</div></blockquote></div><br class=""></div></body></html>