hi,

i have a TreeView, and i want to set the background color to black for
the view thru the model.
related code of the model is as followings:


    def data(self, index, role):
        if role == QtCore.Qt.BackgroundRole:
            br = QtGui.QBrush()
            br.setColor(QtGui.QColor.fromRgb(0))     # Black color
            return br


however, this has no effect. the view still has the white color as the
background.
any idea on what is wrong with my code?

thanks so much,
Jun
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside

Reply via email to