I am looking for a way to control a (child) QCheckBox with a (parent) QCheckBox.

At the beginning, the child checkbox should be disabled until the parent chbox is checked.

Once the parent chbox is checked, the user should be able to interact with the child chbox. However, if the parent chbox is unchecked, the child chbox should be reset to the uncheck state.

Here is the code I have so far

```
import os
import sys
from functools import partial
from PySide.QtCore import *
from PySide.QtGui import *

class TestDialog(QDialog):

    def __init__(self):
        super(TestDialog,self).__init__()

        self.setWindowTitle('Checkbox Family')
        self.initUI()
        self.show()

    def initUI(self):
        # Checkboxes
        parentChbox = QtGui.QCheckBox('Parent', self)
        parentChbox.resize(parentChbox.sizeHint())

        sonChbox = QtGui.QCheckBox('Son', self)
        sonChbox.resize(sonChbox.sizeHint())
        sonChbox.setEnabled(False)
        sonChbox.setCheckState(Qt.Unchecked)

        daughterChbox = QtGui.QCheckBox('Daughter', self)
        daughterChbox.resize(daughterChbox.sizeHint())
        daughterChbox.setEnabled(False)
        daughterChbox.setCheckState(Qt.Unchecked)

        # Layout
        chboxLayout = QtGui.QHBoxLayout()
        chboxLayout.addWidget(parentChbox)
        chboxLayout.addWidget(sonChbox)
        chboxLayout.addWidget(daughterChbox)

        self.setLayout(chboxLayout)

        # Event handling 
        parentChbox.stateChanged.connect(partial(self.parent_check, sonChbox))

    def parent_check(self, childChbox):
        if self.sender().isChecked():
            childChbox.setEnabled(True)
        else:
            # [HELP] If the child checkbox becomes disabled, reset it to uncheck
            if childChbox.isEnabled(False):
                childChbox.setCheckState(Qt.Unchecked)
            else:
                pass

dia = TestDialog()

```

I've searching for days and found out about the functools.partial and also the lambda to pass the child checkbox as an extra argument into the slot method. I have this error when I start checking the parentChbox

```
TypeError: parent_check() takes exactly 2 arguments (3 given)

```

Has anyone ever get through this point, could you please give me some direction to move on?

Thank you so much.