title: Signals and Missing Positional Arguments
body: <p>I developed two windows in QtDesigner (SourceForm, DestinationForm) and used pyuic5 to convert their .ui pages. I am using a third class <code>WController</code> as a way to navigate between the two windows using a stacked widget. I have a button in <code>SourceForm</code> that populates <code>treeWidget</code> with some data and the method <code>handle_treewidget_itemchange</code> dictates what happens when a particular item in <code>treeWidget</code> gets checked or unchecked by using <code>self.treeWidget.itemChanged.connect(self.handle_treewidget_itemchange)</code>. It was my understanding that <code>itemChanged.connect</code> would automatically send the row and column of what was changed to the slot but when <code>handle_treewidget_itemchange(self,row,col)</code> gets called for the first time, my script crashes with a TypeError:</p>
  
  <p><code>TypeError: handle_treewidget_itemchange() missing 2 required positional arguments: 'row' and 'col'</code> </p>
  
  <p>If I take out the <code>row</code> and <code>col</code> args, the script runs fine. When I originally had both the method and the call in the <code>SourceForm</code> .py file itself, my code worked as intended...maybe this is just a scope issue? I am beginning to think attempting to use PyQt while still inexperienced with Python a bad idea :(</p>
  
  <p>I've tried to strip the code down to the essentials:</p>
  
  <pre><code>from PyQt5 import QtCore, QtWidgets
  from PyQt5.QtCore import pyqtSlot
  from imp_sourceform import Ui_SourceForm
  from imp_destform import Ui_DestinationForm
  
  
  class WController(QtWidgets.QMainWindow):
      def __init__(self, parent=None):
          super(WController, self).__init__(parent)
          self.central_widget = QtWidgets.QStackedWidget()
          self.setCentralWidget(self.central_widget)
  
          self.sourcewindow = SourceForm()
          self.destinationwindow = DestinationForm()
  
          self.central_widget.addWidget(self.sourcewindow)
          self.central_widget.addWidget(self.destinationwindow)
  
          self.central_widget.setCurrentWidget(self.sourcewindow)
  
          self.sourcewindow.selectdestinationsbutton.clicked.connect(lambda: self.navigation_control(1))
          self.destinationwindow.backbutton.clicked.connect(lambda: self.navigation_control(0))
  
      def navigation_control(self, topage):
          if topage == 1:
              self.central_widget.setCurrentWidget(self.destinationwindow)
          elif topage == 0:
              self.central_widget.setCurrentWidget(self.sourcewindow)
  
  class SourceForm(QtWidgets.QWidget, Ui_SourceForm):
      def __init__(self):
          super(SourceForm, self).__init__()
          self.setupUi(self)
  
          self.treeWidget.itemChanged.connect(self.handle_treewidget_itemchange) 
  
      @pyqtSlot()
      def handle_treewidget_itemchange(self,row,col): 
          if row.parent() is None and row.checkState(col) == QtCore.Qt.Unchecked: 
              for x in range(0,row.childCount()):
                  row.child(x).setCheckState(0, QtCore.Qt.Unchecked)
          elif row.parent() is None and row.checkState(col) == QtCore.Qt.Checked:
              for x in range(0,row.childCount()):
                  row.child(x).setCheckState(0, QtCore.Qt.Checked)
          else:
              pass
  
  class DestinationForm(QtWidgets.QWidget, Ui_DestinationForm):
      def __init__(self):
          super(DestinationForm, self).__init__()
          self.setupUi(self)
  
  if __name__ == '__main__':
      import sys
      app = QtWidgets.QApplication(sys.argv)
      window = WController()
      window.show()
      sys.exit(app.exec_())
  </code></pre>