mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-05-12 01:25:46 +02:00
refactor: DoubleValidationDelegate moved to qt_utils
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
from PyQt5.QtGui import QDoubleValidator
|
||||
from PyQt5.QtWidgets import QStyledItemDelegate, QLineEdit
|
||||
|
||||
|
||||
class DoubleValidationDelegate(QStyledItemDelegate):
|
||||
def createEditor(self, parent, option, index):
|
||||
editor = QLineEdit(parent)
|
||||
validator = QDoubleValidator()
|
||||
editor.setValidator(validator)
|
||||
return editor
|
||||
Reference in New Issue
Block a user