[PyQt] Re: Setting backgroud color to a QListViewItem

Christoph Burgmer chrislb at gmx.de
Mon Apr 14 20:38:00 BST 2008

> Someone can send example code to set background color to a
> QListViewItem (pyqt3)?

defaultPalette = QtGui.QPalette(element)
newPalette = QtGui.QPalette(defaultPalette)
newPalette.setColor(QtGui.QPalette.Base, Qt.green)

This at least works for QLineEdit under KDE4.


More information about the PyQt mailing list