function - Pyqt 50+ Checkboxes --- How to go about this -


if checkbox checked append value list, , remove if unchecked.

the documentation little confusing --- there clicked() toggled() toggle() statechange() , bunch of others. these should work adding value list, how remove when unchecks rather addin again.

this list passed function.

i having trouble figuring out best way this, there around 50 checkboxes , checkbox

gui 1 function.... maybe use dictionary values strings passed list , put keys in statechange() , or need write entire process out every single checkbox?

i guess weird because used debugging in canopy, canopy doesn't work pyqt, i'm on sublime.

thanks

you can connect clicked() signal function contains if-statement looks if checkbox checked or not.

example:

self.checkbox.clicked.connect(checkbox_state_fu)  def checkbox_state_fu(self):     if self.checkbox.checkstate() != 0:     # checkstate() false 0.         state = true       else:         state = false 

inside if-statement can add/remove item list wish.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -