set_trait

Widget.set_trait(name: str, value: Any) None

Forcibly sets trait attribute, including read-only attributes.