title: Passing extra arguments through connect
body: <p>Is it possible to pass variables through slots so I can print out certain text?
  Trying to pass variable 'DiffP' which is defined in another function to slot.</p>
  
  <p>'DiffP' changes based on which file is selected.</p>
  
  <pre><code>def addLineEdit(self):
      try:
          self.clearLayout()
          self.FileButton ={}
          self.Input = {}
          self.TotalInput = []
          for i in range(int(self.numberLine.text())):
              self.FileButton[i] = QtWidgets.QPushButton(self.centralwidget)
              self.FileButton[i].setText('Case {}'.format(i+1))
              self.FileButton[i].setFlat(True)
              self.FileButton[i].setMaximumSize(QtCore.QSize(50, 50))
              self.hboxlayout[0].addWidget(self.FileButton[i])
              self.FileButton[i].clicked.connect(lambda i=i: self.openfile(i))
              self.buttonGroup.addButton(self.FileButton[i],i)
              self.buttonGroup.buttonClicked['int'].connect(self.input)
  
  def searchfile(self,dir):
          with open(dir) as f:
              content = f.readlines()
              MainList = content[44].split()
              RPM = round(float(MainList[0]), 2)
              Ps = round(float(MainList[1]), 2)
              Ts = round(float(MainList[2]), 2)
              Pd = round(float(MainList[3]), 2)
              Ratio = round(Pd / Ps, 2)
              DiffP = round(Pd - Ps, 2)
  @pyqtSlot(int)
  def input(self,button_or_id,DiffP):
      if isinstance(button_or_id, int):
          if button_or_id == 0:
              self.TotalInput[0].setText(str(DiffP))
          elif button_or_id == 1:
              self.TotalInput[54].setText('1')
  
  def openfile(self,i):
      filename = QtWidgets.QFileDialog.getOpenFileName(self, 'Choose file')
      dir = filename[0]
      directory = os.path.split(dir)[0]
      return self.searchfile(dir)
  </code></pre>