I have an example of QStacked Widget code from internet, which generates its own layout for each child (below) Now I want to collect data from all of them and process it later. How can I know which checkbox was checked, for example? This code layout.addWidget(QCheckBox(“Physics”).stateChanged.connect(self.state_changed)) gives me Process finished with exit code -1073741819 (0xC0000005) Answer When you write that