title: AttributeError: 'Window' object has no attribute 'label1'
body: <p>im new to Python, and I am used to java. Im having trouble in modifying PyQt objects properties using other objects.
  At the moment Iam trying to get this done in a test code i donwloaded, but I cant.
  I want that whe i click the PushButton, the text assigned to label1 change.</p>
  
  <pre><code>import sys
  from PyQt4 import QtGui, QtCore
  from functools import partial
  
  class Window(QtGui.QMainWindow):
  
  def __init__(self):
      super(Window, self).__init__()
      self.setGeometry(50, 50, 500, 300)
      self.setWindowTitle("PyQT tuts!")
      self.setWindowIcon(QtGui.QIcon('pythonlogo.png'))
  
      extractAction = QtGui.QAction("&amp;GET TO THE CHOPPAH!!!", self)
      extractAction.setShortcut("Ctrl+Q")
      extractAction.setStatusTip('Leave The App')
      extractAction.triggered.connect(self.close_application)
  
      self.statusBar()
  
      mainMenu = self.menuBar()
      fileMenu = mainMenu.addMenu('&amp;File')
      fileMenu.addAction(extractAction)
  
  
      self.home()
  
  def home(self):
      btn = QtGui.QPushButton("Quit", self)
      btn.clicked.connect(self.close_application)
      btn.resize(btn.minimumSizeHint())
      btn.move(0,100)
  
      extractAction = QtGui.QAction(QtGui.QIcon('todachoppa.png'), 'Flee the Scene', self)
      extractAction.triggered.connect(self.close_application)
  
      self.toolBar = self.addToolBar("Extraction")
      self.toolBar.addAction(extractAction)
  
      checkBox = QtGui.QCheckBox('Enlarge Window', self)
      checkBox.move(100, 25)
      checkBox.stateChanged.connect(self.enlarge_window)
  
      checkBox1 = QtGui.QCheckBox("CheckTest1", self)
      checkBox1.move(200,50)
      #checkBox1.stateChanged.connect(self.labeltext())
  
      self.pushButton = QtGui.QPushButton("Click", self)
      self.pushButton.move(250,50)
      self.pushButton.clicked.connect(partial(self.labeltext, "It Worked!"))
  
      label1 = QtGui.QLabel("Label original", self)
      label1.move(300,100)
      # depending on what you want the default to be.
      #checkBox.toggle()
      self.show()
  def labeltext(self, text):  
      self.label1.setText(text)
  
  def enlarge_window(self, state):
      if state == QtCore.Qt.Checked:
          self.setGeometry(50,50, 1000, 600)
      else:
          self.setGeometry(50, 50, 500, 300)
  
  
  
  def close_application(self):
      choice = QtGui.QMessageBox.question(self, 'Extract!',
                                          "Get into the chopper?",
                                          QtGui.QMessageBox.Yes | QtGui.QMessageBox.No)
      if choice == QtGui.QMessageBox.Yes:
          print("Extracting Naaaaaaoooww!!!!")
          sys.exit()
      else:
          pass
  def cambiar_label(self, state):
      if state == QtCore.Qt.Checked:
          self.label1.SetText("label new")
      else:
          self.label1.SetText("label original")
  
  
  
  
  
  
  def run():
  app = QtGui.QApplication(sys.argv)
  GUI = Window()
  sys.exit(app.exec_())
  
  
  run()
  </code></pre>