I already have an example here.

http://www.mail-archive.com/pyqt@riv.../msg17197.html

And your sample, the same as that in there. But unfortunately code like that do not display data. Therefore, I ask in here. Sorry...

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