title: Adding multiple actions from sub-menu
body: <p>I am attempting to add another action within a sub menu in PyQt4. I can't seem to figure out how I would go about doing this. For instance,</p>
  
  <pre><code>from PyQt4 import QtGui
  import sys
  
  
  class Window(QtGui.QMainWindow):
  
    def __init__(self):
      super(Window, self).__init__()  #Returns the parent object or the QMainWindow object
      self.setGeometry(50, 50, 500, 300)
      self.setWindowTitle("Testing")
  
      newAction = QtGui.QAction("&amp;Add Action", self)
      newAction.triggered.connect(self.new_action)
  
      mainMenu = self.menuBar()
  
      fileMenu = mainMenu.addMenu('&amp;File')
      fileMenu.addMenu('New Menu').addAction(newAction)
  
    def home(self):
      self.show()
  
    def new_action(self):
      print("Made it")
  
  
      pass
  
  
  def run():
    app = QtGui.QApplication(sys.argv)
    GUI = Window()
    sys.exit(app.exec_())
  
  
  run()
  </code></pre>
  
  <p>in the code above I have created an action within a sub menu. However, I can not seem to figure out how to create multiple actions within that sub menu such that, when the user enters the sub menu "New Menu" they will be presented with more options than just "Add Action".</p>
  
  <p>I attempted creating another set of actions ie:</p>
  
  <pre><code>newAction = QtGui.QAction("&amp;Add Action", self)
      newAction.triggered.connect(self.new_action)
  
      AnotherAction = QtGui.QAction("&amp;Add Action", self)
      AnotherAction.triggered.connect(self.new_action)
  
      mainMenu = self.menuBar()
  
      fileMenu = mainMenu.addMenu('&amp;File')
      fileMenu.addMenu('New Menu').addAction(newAction).addAction(AnotherAction)
  </code></pre>
  
  <p>but this gave me an error:</p>
  
  <pre><code>fileMenu.addMenu('New Menu').addAction(newAction).addAction(AnotherAction)
  AttributeError: 'NoneType' object has no attribute 'addAction'
  </code></pre>
  
  <p>I also tried:</p>
  
  <pre><code>newAction = QtGui.QAction("&amp;Add Action", self)
      newAction.triggered.connect(self.new_action)
  
      newAction = QtGui.QAction("&amp;New Action", self)
      newAction.triggered.connect(self.new_action)
  
      mainMenu = self.menuBar()
  
      fileMenu = mainMenu.addMenu('&amp;File')
      fileMenu.addMenu('New Menu').addAction(newAction)
  </code></pre>
  
  <p>However, this just ignores "Add Action" and only shows "New Action". </p>
  
  <p>I hope it is clear what I am trying to do. If not please say so and I will attempt to make it more clear.</p>