I want create my custom model. But i confused with the code.

I want set text aligment some column and if in a cell have value =0, cell will color red.

Qt Code:
  1. #!/usr/bin/env python
  2.  
  3. from PyQt4.QtCore import *
  4. from PyQt4.QtGui import *
  5. from PyQt4.QtSql import *
  6.  
  7. class myModel(QSqlQueryModel):
  8. def __init__(self, parent=None):
  9. QSqlQueryModel.__init__(self)
  10.  
  11. def data(self, index, role):
  12. ?????
To copy to clipboard, switch view to plain text mode 

Sorry, my englis is bad