[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] Null pointer test
From:       Phil Thompson <phil () river-bank ! demon ! co ! uk>
Date:       2002-10-17 21:54:58
[Download RAW message or body]

On Thursday 17 October 2002 7:25 pm, Ingo Krabbe wrote:
> Hi,
>
> I've the following problem, while trying to build a tree in a QListView:
>
> Each Item of the QListView is a QListViewItem.  I insert into the tree
> in sorted manner by storing the last parent and starting with the
> QListView as the initial parent:
>
> 	item = QListViewItem( parent, X_i )
> 	parent.insertItem( item )
> 	parent = item
>
> When I want to go a level up I do:
>
> 	parent = parent.parent()
>
> But this only works if we aren't at the root node since a QListViewItem
> isn't a QObject but opens an own base class.  So
>
> 	parent.parent() would give NULL in C++.
>
> What's returned in pyqt here ?

None

Phil

_______________________________________________
PyKDE mailing list    PyKDE@mats.gmd.de
http://mats.gmd.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic