title: Keep menu open after clicking on the button it is launched with
body: <p>I have a QToolButton with a menu. When the QToolButton is clicked, the menu appears. The default behavior is that when an action is clicked from the menu, the menu disappears. How can I make it so that the menu stays open until the user clicks elsewhere?</p>
  
  <p>Here is minimal code that shows the behavior:</p>
  
  <pre><code>from PyQt4 import QtGui, QtCore
  import sys, os
  
  if __name__ == '__main__':
      app = QtGui.QApplication(sys.argv)
      toolButton = QtGui.QToolButton()
      toolButton.setText('Select')
      toolMenu = QtGui.QMenu()
      for i in range(3):
          action = toolMenu.addAction(str(i))
          action.setCheckable(True)
      toolButton.setMenu(toolMenu)
      toolButton.setPopupMode(QtGui.QToolButton.InstantPopup)
      toolButton.show()
      sys.exit(app.exec_())
  </code></pre>