[PyKDE] QListBoxItem
Peter Osborne
pete at bookware3000.ca
Mon Nov 4 17:01:01 GMT 2002
Yup,
I've done this.
You need to reimplement the class, redifining the paintCell method. Something
like this will atleast get you started:
class myListViewItem(QListViewItem):
def __init__(self, qlistview, parent=None):
QListViewItem.__init__(self, qlistview, None)
def setFont(self,family="Arial",size=12,bold=0):
self.font = QFont(family, size)
self.font.setBold(bold)
def paintCell(self,qpainter,cg,col,width,align):
qpainter.setFont()
QListViewItem.paintCell(self,qpainter,self.pal.active(),col,width,align)
-Pete
On November 4, 2002 10:29 am, Rune Hansen wrote:
> I'm pondering over how to set the text of a single QListBoxItem (not
> every item) to bold or to a colour. Can anyone help me?
>
> python2.2.1, pyqt.3.3x
>
> regards
>
> /rune
>
>
> _______________________________________________
> PyKDE mailing list PyKDE at mats.gmd.de
> http://mats.gmd.de/mailman/listinfo/pykde
More information about the PyQt
mailing list