def createEditor(self, parent, option, index):
     if index.column() in (MOD1, MOD2, MOD3):
         combobox = QComboBox(parent)
         combobox.addItems(self.modifiers)
         return combobox
     elif index.column() == KEY:
         combobox = QComboBox(parent)
         combobox.addItems(self.keys)
         return combobox
     else:
         return QItemDelegate.createEditor(self, parent, option, index)
Example #2
0
 def createEditor(self, parent, option, index):
     if index.column() in (MOD1, MOD2, MOD3):
         combobox = QComboBox(parent)
         combobox.addItems(self.modifiers)
         return combobox
     elif index.column() == KEY:
         combobox = QComboBox(parent)
         combobox.addItems(self.keys)
         return combobox
     else:
         return QItemDelegate.createEditor(self, parent, option, index)