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.
#!/usr/bin/env python
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtSql import *
def __init__(self, parent=None):
def data(self, index, role):
?????
#!/usr/bin/env python
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtSql import *
class myModel(QSqlQueryModel):
def __init__(self, parent=None):
QSqlQueryModel.__init__(self)
def data(self, index, role):
?????
To copy to clipboard, switch view to plain text mode
Sorry, my englis is bad
Bookmarks