Set snapToTicks property.
Whether erroneous values are automatically changed to the spin buttons nearest step increment.
Set snapToTicks property.