Reputation: 141
I have a bunch of dynamically created checkboxes and the last checkbox is labelled: 'check all/ uncheck all'.
Is it possible to have an onclick listener attached to the very last checkbox? Or will I have to resort to using a button?
Upvotes: 2
Views: 459
Reputation: 8242
You probably don't want to listen just for click events, since the state of a QCheckBox
can also be triggered by the keyboard. In most cases you'd want to listen to the stateChanged signal.
Upvotes: 2