'Set an :class:`~.layout.AnchorLayout`'

def set_anchor_layout(self, layout):

    if (self.__anchor_layout != layout):
        if self.__anchor_layout:
            self.__anchor_layout.deleteLater()
            self.__anchor_layout = None
        self.__anchor_layout = layout
