title: AttributeError: 'bool' object has no attribute 'accept'
body: <p>i´m new to using python and PyQt, and i´m making a PyQt project for my university. I´m writing this code: </p>
  
  <pre><code>import sys
  from PyQt4.QtCore import *
  from PyQt4.QtGui import *
  from PyQt4 import uic
  
  class Ventana(QMainWindow):
      def __init__(self):
          super(QMainWindow, self).__init__()
          uic.loadUi("MainVentanaNew.ui", self)
          self.showMaximized()
          self.setMinimumSize(250,200)
  
  #Menubar elements
          self.actionNuevo.setShortcut("Ctrl+n")
          self.actionNuevo.setStatusTip("Crea un nuevo archivo")
  
          self.actionSalir.setShortcut("Alt+F4")
          self.actionSalir.setStatusTip("Cierra la aplicación")
          self.actionSalir.triggered.connect(self.closeEvent)
  
      def closeEvent(self, event):
          self.statusBar().showMessage("Saliendo de la aplicación")
          preguntar = QMessageBox.question(self, "Salir...", 
          "¿Seguro desea salir", QMessageBox.Yes | QMessageBox.No)
          if preguntar == QMessageBox.Yes:
              event.accept()
          else:
              event.ignore()
  
  app = QApplication(sys.argv)
  window = Ventana()
  window.show()
  sys.exit(app.exec_())
  </code></pre>
  
  <p>The indentation in my code is correct, maybe i made some mistakes copying it in here, but it´s ok. So, my problem is that when i build it, it throws me this error:</p>
  
  <p>"AttributeError: 'bool' object has no attribute 'accept' ", </p>
  
  <p>when i want to close the main window using the menubar's element "self.actionSalir". But,when i close it in any other way, it works.  </p>
  
  <p>What can i do to accomplish this? I mean, closing the mainwindow using the menubar's element?</p>
  
  <p>Thanks for your time and your answers.</p>