The problem of how to dynamically refresh checkbox in pyqt5 Development

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)
Nov.29,2021

clear it out during the refresh operation.


problem has been solved. For more information, please refer to my brief
https://www.jianshu.com/p/8ea.
if you have any questions, please feel free to ask or add

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b39a39-2c1da.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b39a39-2c1da.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?