title: How to tune (Py-)Qt menus?
body: <p>I would like to set two things for submenus in PyQt:</p>
  
  <ol>
  <li>not open submenus when hovered</li>
  <li>no delay when submenus get opened by a click</li>
  </ol>
  
  <p>I suppose that I had to modify the hover behavior of the <code>QAction</code> object that is returned by the <code>menuAction()</code> method of the submenu object - but how to do this?</p>
  
  <p>There is a <code>QStyle::SH_Menu_SubMenuPopupDelay</code> setting mentioned in the docs that is maybe what I need for the second but I also have no clue how to set this in PyQt.</p>
  
  <p>My basic menu example:</p>
  
  <pre><code>#!/usr/bin/env python
  from PyQt4 import QtGui
  from PyQt4 import QtCore
  
  class MainWindow(QtGui.QMainWindow):
      def __init__(self, parent=None):
          super(MainWindow, self).__init__(parent)
  
          self.menubar = QtGui.QMenuBar(self)
          self.setMenuBar(self.menubar)
          self.menuFile = QtGui.QMenu(self.menubar, title='File')
          self.menubar.addAction(self.menuFile.menuAction())
          self.submenu = QtGui.QMenu(self.menuFile, title='Submenu')
          self.menuFile.addAction(QtGui.QAction(self, text="First"))
          self.menuFile.addAction(self.submenu.menuAction())
          self.menuFile.addAction(QtGui.QAction(self, text="Third"))
          self.submenu.addAction(QtGui.QAction(self, text="First"))
          self.submenu.addAction(QtGui.QAction(self, text="Second"))
          self.submenu.addAction(QtGui.QAction(self, text="Third"))
  
  if __name__ == '__main__':
      import sys
  
      app = QtGui.QApplication(sys.argv)
      mw = MainWindow()
      mw.show()
      sys.exit(app.exec_())
  </code></pre>