How to get the integer value of a checkBox
-
I want to get the int value when I check the checkBox, the result I get is a 0 instead of 1. Below is what I did please I need assistance.
can_add = int(self.ui.manageemp_canAdd_checkBox.isChecked()) print(can_add)
-
@LT-K101
This code should be returning the correct value, so if it returns0
that checkbox is not checked. Check where you are calling it from, and which checkbox it refers to.