Fix QgsProcessingParameterNumber docstring example

(cherry picked from commit 66011b22ce181c93aebeda1f0c320f254a67ca30)
This commit is contained in:
Alexandre Neto 2020-09-24 01:54:04 +01:00 committed by Nyall Dawson
parent c7633874aa
commit 279c499bb1
2 changed files with 2 additions and 2 deletions

View File

@ -1954,7 +1954,7 @@ shown in the parameter's widget can be specified by setting the parameter's meta
.. code-block:: python
param = QgsProcessingParameterNumber( 'VAL', 'Threshold', type=QgsProcessingParameter.Double)
param = QgsProcessingParameterNumber( 'VAL', 'Threshold', type=QgsProcessingParameterNumber.Double)
# only show two decimal places in parameter's widgets, not 6:
param.setMetadata( {'widget_wrapper':
{ 'decimals': 2 }

View File

@ -1947,7 +1947,7 @@ class CORE_EXPORT QgsProcessingParameterMultipleLayers : public QgsProcessingPar
* shown in the parameter's widget can be specified by setting the parameter's metadata. For example:
*
* \code{.py}
* param = QgsProcessingParameterNumber( 'VAL', 'Threshold', type=QgsProcessingParameter.Double)
* param = QgsProcessingParameterNumber( 'VAL', 'Threshold', type=QgsProcessingParameterNumber.Double)
* # only show two decimal places in parameter's widgets, not 6:
* param.setMetadata( {'widget_wrapper':
* { 'decimals': 2 }