title: Clickable QLabel in PyQt?
body: <p>I'm creating a side menu using pyqt4.</p>
  
  <p>I turned the QLabel (burgermenu) into a picture of a burger menu, and I'm having trouble making it clickable.</p>
  
  <p>My intension is that when I click the burgermenu image, the inner frame (innerframe) hides totally, and when I click burgermenu again; the innerframe appears with its content.</p>
  
  <p>How can I achieve that?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>from PyQt4 import QtCore, QtGui
  from PyQt4.QtGui import *
  
  try:
      _fromUtf8 = QtCore.QString.fromUtf8
  except AttributeError:
      def _fromUtf8(s):
          return s
  try:
      _encoding = QtGui.QApplication.UnicodeUTF8
      def _translate(context, text, disambig):
          return QtGui.QApplication.translate(context, text, disambig, _encoding)
  except AttributeError:
      def _translate(context, text, disambig):
          return QtGui.QApplication.translate(context, text, disambig)
  
  class Ui_MainWindow(object):
      def setupUi(self, MainWindow):
          MainWindow.setObjectName(_fromUtf8("MainWindow"))
          MainWindow.resize(479, 381)
          self.centralwidget = QtGui.QWidget(MainWindow)
          self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
          self.outerframe = QtGui.QFrame(self.centralwidget)
          self.outerframe.setGeometry(QtCore.QRect(190, 80, 151, 211))
          self.outerframe.setFrameShape(QtGui.QFrame.StyledPanel)
          self.outerframe.setFrameShadow(QtGui.QFrame.Raised)
          self.outerframe.setObjectName(_fromUtf8("outerframe"))
          self.burgermenu = QtGui.QLabel(self.outerframe)
          self.burgermenu.setGeometry(QtCore.QRect(70, 10, 71, 20))
          self.burgermenu.setObjectName(_fromUtf8("burgermenu"))
          self.innerframe = QtGui.QFrame(self.outerframe)
          self.innerframe.setGeometry(QtCore.QRect(10, 60, 131, 141))
          self.innerframe.setFrameShape(QtGui.QFrame.StyledPanel)
          self.innerframe.setFrameShadow(QtGui.QFrame.Raised)
          self.innerframe.setObjectName(_fromUtf8("innerframe"))
          self.widget = QtGui.QWidget(self.innerframe)
          self.widget.setGeometry(QtCore.QRect(20, 30, 91, 99))
          self.widget.setObjectName(_fromUtf8("widget"))
          self.verticalLayout = QtGui.QVBoxLayout(self.widget)
          self.verticalLayout.setMargin(0)
          self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
          self.label_2 = QtGui.QLabel(self.widget)
          self.label_2.setObjectName(_fromUtf8("label_2"))
          self.verticalLayout.addWidget(self.label_2)
          self.dateEdit = QtGui.QDateEdit(self.widget)
          self.dateEdit.setObjectName(_fromUtf8("dateEdit"))
          self.verticalLayout.addWidget(self.dateEdit)
          MainWindow.setCentralWidget(self.centralwidget)
          self.menubar = QtGui.QMenuBar(MainWindow)
          self.menubar.setGeometry(QtCore.QRect(0, 0, 479, 22))
          self.menubar.setObjectName(_fromUtf8("menubar"))
          MainWindow.setMenuBar(self.menubar)
          self.statusbar = QtGui.QStatusBar(MainWindow)
          self.statusbar.setObjectName(_fromUtf8("statusbar"))
          MainWindow.setStatusBar(self.statusbar)
  
          self.retranslateUi(MainWindow)
          QtCore.QMetaObject.connectSlotsByName(MainWindow)
  
      def retranslateUi(self, MainWindow):
          MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))
          self.burgermenu.setText(_translate("MainWindow", "burgermenu", None))
          self.burgermenu.setPixmap(QPixmap("/Users/Desktop/menu.png"))
          self.label_2.setText(_translate("MainWindow", "Date:", None))
  
  if __name__ == "__main__":
      import sys
      app = QtGui.QApplication(sys.argv)
      MainWindow = QtGui.QMainWindow()
      ui = Ui_MainWindow()
      ui.setupUi(MainWindow)
      MainWindow.show()
      sys.exit(app.exec_())
  </code></pre>