Skip to content

Commit 2e0285c

Browse files
committed
Validator
1 parent bfcbeaa commit 2e0285c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

activity_browser/layouts/pages/activity_details/exchanges_tab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def createEditor(self, parent, option, index):
277277
editor = QtWidgets.QLineEdit(parent)
278278
locale = QtCore.QLocale(QtCore.QLocale.English)
279279
locale.setNumberOptions(QtCore.QLocale.RejectGroupSeparator)
280-
validator = QtGui.QDoubleValidator()
280+
validator = QtGui.QRegularExpressionValidator(QtCore.QRegularExpression(r"^[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)$"), editor)
281281
validator.setLocale(locale)
282282
editor.setValidator(validator)
283283
return editor

0 commit comments

Comments
 (0)