[PyKDE] more QListView problems!?
    Thierry Jouve 
    jouve at esrf.fr
       
    Fri Jul  5 13:54:01 BST 2002
    
    
  
Hi,
I've found your problem...
You must call takeItem but on the item's parent ...
So, in the delete method, you must replace ;
   self.takeItem(item)
by :
   item.parent().takeItem(item)
I don't know why we must do like this, but il works......
--
   Thierry
Michael Lauer wrote:
> 
> Hi,
> 
> could someone please tell me what I'm doing wrong, I really
> don't get it...
> 
> I can't get to delete a single QListViewItem - instead the whole tree
> is deleted. I tested this on many PyQt version (including the
> 3.3rc2) with Qt 3.0.3 and Qt 3.0.4.
> 
> The attached program demonstrates it. If you right-click on a
> node, the whole tree is being deleted.
> 
> (BTW, after closing the program, I get a segfault, but that's only
> a minor issue)
> 
> Where is the problem and could someone post a code snippet which
> does this?
> 
> Sincerely,
> 
> --
> :M:
> --------------------------------------------------------------------------
> Dipl.-Inf. Michael 'Mickey' Lauer
> mickey at tm.informatik.uni-frankfurt.de
>   Raum 10b - ++49 69 798 28358       Fachbereich Informatik und Biologie
> --------------------------------------------------------------------------
> 
>   ------------------------------------------------------------------------
>                   Name: listview.py
>    listview.py    Type: application/x-python
>               Encoding: base64
--
   Thierry JOUVE
   BLISS GROUP - ESRF
   Mail : jouve at esrf.fr, Office : 155b, Tel : 29-46
    
    
More information about the PyQt
mailing list