Esempio n. 1
0
 def setEditorData(self, editor, index):
     timestamp = index.model().data(index, Qt.EditRole)
     if timestamp == '':
         QSqlRelationalDelegate.setEditorData(self, editor, index)
     else:
         editor.setDateTime(datetime.fromtimestamp(timestamp))
Esempio n. 2
0
 def setEditorData(self, editor, index):
     amount = index.model().data(index, Qt.EditRole)
     if amount:
         editor.setText(self.formatFloatLong(float(amount)))
     else:
         QSqlRelationalDelegate.setEditorData(self, editor, index)
Esempio n. 3
0
 def setEditorData(self, editor, index):
     delegate = self.getDelegate(index)
     if delegate:
         delegate.setEditorData(editor, index)
     else:
         QSqlRelationalDelegate.setEditorData(self, editor, index)