def setRole(self, role): ''' Called by the style editing mechanism when the user changes the role. The role is here only the user-determined part, and does not include the hard-coded part from ROLE.''' self.details.style_role = role self.arrow.setRole(role) Text.setRole(self, role) self.applyStyle()