title: Missing menuBar in PyQt5
body: <p>I've been developing a GUI using PyQt5 and wanted to include a menu bar. When I went to code this feature, however, my menu wouldn't appear. Figuring my understanding on how to implement menu bars in PyQt5 was off, I looked for a pre-existing example online. With some tweaking I developed the following test case:</p>
  
  <pre><code>import sys
  from PyQt5.QtGui import QIcon
  from PyQt5.QtWidgets import QApplication, QMainWindow, QMenuBar, QAction, qApp
  
  class Example(QMainWindow):
  
      def __init__(self):
          super().__init__()
  
          exitAction = QAction(QIcon('exit.png'), '&amp;Exit', self)
          exitAction.triggered.connect(qApp.quit)
  
          menubar = self.menuBar()
          fileMenu = menubar.addMenu('&amp;Testmenu')
          fileMenu.addAction(exitAction)
  
          self.show()
  
  
  if __name__ == '__main__':
      app = QApplication(sys.argv)
      ex = Example()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>When I run this, however, <code>Testmenu</code> is nowhere to be found.</p>
  
  <p>I have also tried creating the menu bar (and the rest of my GUI layout) in QTCreator before converting the .ui file to an importable .py using pyuic5. I thought this would eliminate some programming mistake on my end, but the menubar still won't show. Any thoughts? </p>
  
  <p>Edit:</p>
  
  <p>Im running this code using Python 3.5 (Anaconda 4.1) from within a Jupyter notebook, version 4.1. I'm also using a Macbook running os 10.1l, PyQt 5.7 and Qt version 5.7.0.</p>
  
  <p>I've realized that the menu bar will become responsive if I click off the application window and then click back onto the window - effectively unfocusing and the focusing the application. Armed with this information I realized that I am not the first to notice this problem (see <a href="https://github.com/robotology/yarp/issues/457" rel="noreferrer">https://github.com/robotology/yarp/issues/457</a>). Unfortunately, I'm still not sure how to resolve the issue.</p>