bulk added checkbox to gridlayout, and how to remove these checkbox when refreshing the page.
attach code
def __init__():
self.model_gridlayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
self.model_gridlayout.setContentsMargins(0, 0, 0, 0)
self.model_gridlayout.setObjectName("model_gridlayout")
def create_box():
for i in data:
if i[0]:
checkbox = self.create_checkbox(i[0],i[1])
self.model_gridlayout.addWidget(checkbox, x, index, 1, 1)
self.model_widgets.append(checkbox)