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

List:       pykde
Subject:    Re: [PyKDE] QItemSelectionModel disappearing from under derived class
From:       Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date:       2007-02-23 19:26:38
Message-ID: 200702231926.38222.phil () riverbankcomputing ! co ! uk
[Download RAW message or body]

On Friday 23 February 2007 7:12 pm, Rich Pickler wrote:
> I have a class derived from a QItemSelectionModel in order to simplify
> some behaviors when new selections are made in order to get those
> changes to other selection models.  Unfortunately, the
> QItemSelectionModel is deleted out from under my derived class, causing
> my program to crash with one of two errors depending on the how I re-
> arrange the code.
>
> 1) Fatal Python error: GC object already tracked
> 2) RuntimeError: underlying C/C++ object has been deleted
>
> Any ideas?
>
> In trying to diagnose this problem, I've tried out a number of things,
> with results I did not expect:
>
> * I monitored the connectNotify and the disconnectNotify functions from
> my derived class, and they are never called.  Looking at the qt source,
> there are two signals that are connected and disconnected every time
> setSelectionModel is called.
> * If I over-ride setSelectionModel in my widget, the function gets a
> pointer to a QItemSelectionModel, not my derived class.
>
> This is all with PyQt 4.0.1, Sip 4.4.5, and QT 4.1.4.

You need to construct a test case that demonstrates the problem.

Phil

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.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