def createEditor(self, parent, option, index): editor = QSpinBox(parent) editor.setMinimum(0) editor.setMaximum(100) return editor