'Set the controls points on the margins around `rect`'

def setControlMargins(self, *margins):

    if (len(margins) > 1):
        margins = QMargins(*margins)
    else:
        margins = margins[0]
        if isinstance(margins, int):
            margins = QMargins(margins, margins, margins, margins)
    if (self.__margins != margins):
        self.__margins = margins
        self.__pointsLayout()
