(self, prec: int)
Set the number of decimals in display/edit

        If negative value then no rounding takes place and the value is
        displayed using `QLocale.FloatingPointShortest` precision.
Set the number of decimals in display/edit
Set the number of decimals in display / edit
def setDecimals(self, prec: int) -> None:
        """
        Set the number of decimals in display/edit

        If negative value then no rounding takes place and the value is
        displayed using `QLocale.FloatingPointShortest` precision.
        """
        self.__decimals = prec
        if prec < 0:
            # disable rounding in base implementation.
            super().setDecimals(DBL_MAX_10_EXP + DBL_DIG)
        else:
            super().setDecimals(prec)
def setDecimals ( self , prec : int ) -> None : self . __decimals = prec if prec < 0 : # disable rounding in base implementation. super ( ) . setDecimals ( DBL_MAX_10_EXP + DBL_DIG ) else : super ( ) . setDecimals ( prec )