[PyKDE] QHeader problem

Gordon Tyler gordon at doxxx.net
Wed Jun 19 18:33:01 BST 2002


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()) :
   qHeader.removeLabel(0)

Ciao,
Gordon





More information about the PyQt mailing list