Someone give me a sample code

Qt Code:
  1. def data(self, index, role):
  2. value=QSqlQueryModel.data(self, index, role)
  3. if role == Qt.TextAlignmentRole:
  4. if (index.column()==2):
  5. return QVariant(Qt.AlignRight)
  6. return value
To copy to clipboard, switch view to plain text mode 


i hope can be useful for others