mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 17:04:54 +01:00
added hardcoded min/max for number delegate
This commit is contained in:
parent
b7efe9b9f6
commit
108666cd3f
1 changed files with 2 additions and 0 deletions
|
|
@ -4,6 +4,8 @@ from Qt import QtWidgets, QtCore
|
|||
class NumberDelegate(QtWidgets.QStyledItemDelegate):
|
||||
def createEditor(self, parent, option, index):
|
||||
editor = QtWidgets.QSpinBox(parent)
|
||||
editor.setMaximum(999999)
|
||||
editor.setMinimum(0)
|
||||
value = index.data(QtCore.Qt.DisplayRole)
|
||||
if value is not None:
|
||||
editor.setValue(value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue