Skip to content

Commit

Permalink
Fix SpinBox to have a default locale-aware DoubleValidator
Browse files Browse the repository at this point in the history
The validator is only pertinent when a SpinBox is editable acting only
on the text string input and does not affect the SpinBox's
value-based from: and to: limits.
  • Loading branch information
MikeTrahearn-Qinetic committed Dec 9, 2024
1 parent 7c229be commit c2dda1e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/controls/SpinBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ CT.SpinBox {
}
}

validator: DoubleValidator {
locale: root.locale.name
bottom: Math.min(root.from, root.to)
top: Math.max(root.from, root.to)
notation: DoubleValidator.StandardNotation
}

Timer {
id: pressTimer

Expand Down

0 comments on commit c2dda1e

Please sign in to comment.