def select_parent(self):
        if self._selected_widget:
            parent = self._selected_widget.parent()
            if parent and parent.inherits('QWidget'):
                self.update_selected_widget(parent)