Set canFocus property.
Whether the widget or any of its descendents can accept the input focus.
This property is meant to be set by widget implementations, typically in their instance init function.
Set canFocus property.