[PyKDE] QListView has not childCount nor LastItem

Sebastian Kügler sebas at kde.nl
Tue Aug 30 20:29:11 BST 2005


> > On 30/08/05, Sebastian Kügler <sebas at kde.nl> wrote:
> > > if self.listview.childCount() == 0: # AttributeError
> > >         self.deletebutton.setEnabled(False)
> > >
> > > The childCount is - although documented [0] - not a method of the
> > > QListView (not in dir(self.listview), if I insert it.

On Tuesday 30 August 2005 20:47, Giacomo Lacava wrote:
> You are using a QListBox, not a QListView; it's a very different
> animal... QListBox hasn't got childCount, not even in the C++ QT.
> Btw, with QListView (Qt 3.3.4, PyQT 3.14.1, Debian/Sid) childCount()
> works "as advertised" :)

You're right, I used the wrong widget.

Thanks!
-- 
sebas

 http://www.kde.nl | http://vizZzion.org |  GPG Key ID: 9119 0EF9 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You can have my Unix system when you pry it from my cold, dead fingers. - Cal 
Keegan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20050830/e82edc06/attachment.bin


More information about the PyQt mailing list