title: Use QAction without adding to menu (or toolbar)
body: <p>I'm trying to develop an application with a very modular approach to commands and thought it would be nice, sind I'm using pyqt, to use QAction's to bind shortcuts to the commands.<br>
  However, it seems that actions shortcuts only works when the action is visible in a menu or toolbar. Does anyone know a way to get this action to work without it being visible?<br>
  Below some example code that shows what I'm trying.<br>
  Thanks,</p>
  
  <p>André</p>
  
  <pre><code>from PyQt4 import *
  from PyQt4.QtCore import *
  from PyQt4.QtGui import *
  import sys
  
  class TesteMW(QMainWindow):
      def __init__(self, *args):
          QMainWindow.__init__(self, *args)
          self.create_action()
  
      def create_action(self):
          self.na = QAction(self)
          self.na.setText('Teste')
          self.na.setShortcut('Ctrl+W')
          self.connect(self.na, SIGNAL('triggered()'), self.action_callback)
          # uncomment the next line for the action to work
          # self.menuBar().addMenu("Teste").addAction(self.na)
  
      def action_callback(self):
          print 'action called!'
  
  
  app = QApplication(sys.argv)
  mw = TesteMW()
  mw.show()
  
  app.exec_()
  </code></pre>