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

List:       pykde
Subject:    [PyQt] sip.cast changes behaviour of == operator?
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2011-02-21 20:30:28
Message-ID: 20110221203028.GB10998 () barmbek
[Download RAW message or body]

Hi,

still working on the modeltest.py code, picking up one of the older
threads about it:
 http://www.opensubscriber.com/message/pyqt@riverbankcomputing.com/10335500.html

As far as I can see the reason for this is the casting done at the start
of the ModelTest class. It looks like sip.cast changes the behaviour of
comparing the references in this code:

assert( index.model() == self.model )

index.model() is a QStringListModel instance, self.model is a
QAbstractItemModel and both have different internal id's.

And it seems like sip.cast creates a new wrapped instance each time,
simply doing a sip.cast() for the index.model() call does not help.

Is that intentional (I guess so) and is there a way to still get the
assertion to work as it should?

Andreas

-- 
Be careful!  Is it classified?
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

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