I'm developing a form using PyQt. I do not understand how objects connect to one another.
Example: I Have a QLineEdit and QCheckBox. When the status indicates this QCheckBox and QLineEdit becomes available or unavailable for input.
Now I use here such construction:
lambda state: self.MyLineEdit.setReadOnly(
True if state == 2 else False
But you cannot, for example, passing in a loop for all the checkboxes to secondentity each with its LINEITEM and to connect hundred checkboxes hundred times I have to repeat this construction every time clearly indicating a new field.
In my view it should be possible to group widgets to each checkbox you can give the command to change the status of your widget.
Question: how do I avoid obvious names or references to objects in your code? Is there some kind of grouping widget that implements their relationship for me? What to read?