'Set the constraint for the point (Qt.Vertical Qt.Horizontal or 0)
.. note:: Clears the constraintFunc if it was previously set'

def setConstraint(self, constraint):

    if (self.__constraint != constraint):
        self.__constraint = constraint
    self.__constraintFunc = None
