コード例 #1
0
ファイル: mapper_delegate.py プロジェクト: uMag/ledger
 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))
コード例 #2
0
ファイル: mapper_delegate.py プロジェクト: uMag/ledger
 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)
コード例 #3
0
ファイル: mapper_delegate.py プロジェクト: uMag/ledger
 def setEditorData(self, editor, index):
     delegate = self.getDelegate(index)
     if delegate:
         delegate.setEditorData(editor, index)
     else:
         QSqlRelationalDelegate.setEditorData(self, editor, index)