[PyKDE] QHeader problem
gordon at doxxx.net
Wed Jun 19 18:41:00 BST 2002
From: "Gordon Tyler" <gordon at doxxx.net>
> From: "Thierry Jouve" <jouve at esrf.fr>
> > I have a problem with a QHeader object...
> > When I want to remove all labels contained in a QHeader object, only
> > half of them are removed...
> > qHeader = qTable.verticalHeader()
> > for i in range(0, qHeader.count()) :
> > qHeader.removeLabel(i)
> > I have try to make a "qHeader.update()", but it has no effect...
> > PyQt : 3.1 , Python : 2.1.1, Qt : 3.0.2, Sip : 3.1
> You're only removing every second header. Your loop should look like this:
> qHeader = qTable.verticalHeader()
> for i in range(0, qHeader.count()) :
Now that I think about it some more, your loop could look like this too:
qHeader = qTable.verticalHeader()
while qHeader.count() > 0:
More information about the PyQt