在这里,我基于“功能大小”创建一个复选框,现在我必须为所选的那些复选框编写查询。我如何检查它是否被单击,然后继续进行。
no_of_functions = cur3.rowcount
result = cur3.fetchall()
list_functions = list(result)
# craete checkbox dynamically
checkbox = 'checkbox2'
r_move = 345
c_move = 70
self.label2 = QLabel('Functions', self)
self.label2.move(350, 50)
for i in range(no_of_functions):
name = str(list(result[i]))
name = name.replace("[", "")
name = name.replace("]", "")
name = name.replace("'", "")
cb = checkbox + str(i)
self.cb = QCheckBox(name, self)
self.cb.move(r_move, c_move)
c_move = c_move + 20