title: How to display a text string as label when a button is clicked in PyQt4 (python)?
body: <p>I am a novice in creating app using PyQt. My question may be silly but please bear with me.
  I have written a code to display a text string as a label when the button is clicked. I am not getting the output. Please tell me what is the error and how do i rectify it ??</p>
  
  <pre><code>import sys
  from PyQt4 import QtGui,QtCore
  
  class Window(QtGui.QMainWindow):
  
      def __init__(self):
          super(Window,self).__init__()
          self.setGeometry(100,100,600,600)
          self.setWindowTitle("healapp")
          self.pbtn()
  
  
      def pbtn(self):
  
          btn1=QtGui.QPushButton('hi',self)
          btn1.move(100,100)
          btn1.clicked.connect(self.buttnpress)
  
  
      def buttnpress(self):
          labl=QtGui.QLabel(self)
          labl.setText("clicked")
  
  
  
  def main():
      app=QtGui.QApplication(sys.argv)
      GUI=Window()
      GUI.show()
      sys.exit(app.exec_())
  
  
  main()
  </code></pre>