I'm trying to find a way to substitute the name of the object in "self". Is it even possible to do this? It's just that I have a lot of checkboxes, when turned on, other elements should be activated (spinboxes, comboboxes, etc.). I consider it impractical to write a check for each object. I thought it would make the cycle more logical, but it doesn't work.
for item in self.findChildren(QtWidgets.QCheckBox):
if item.isChecked():
x = item.objectName().split('_')[1]
self.sb + f".{x}." + setDisabled()
"self.sb" is a "spanbox. the code is just an example of what I want to do. I know that I substituted the concatenation incorrectly.