Sorry, explanation required:
The code compares the "value" attribute of the widget with the input
value. As the input value is None, and you have not specified the
attribute value, this is also None. Therefore the "checked" attribute
is inserted. The Bool validator returns True or False, neither of which
equal None and therefore the attribute "checked" is missing. Therefore
always set the "value" attribute to an explicit value.

I know this is not clear or documented, and it would be better to have
a "value" argument in the constructor or somesuch.

Reply via email to