[PyQt] QVariant bug(?)

Arve Knudsen arve.knudsen at gmail.com
Tue Sep 2 10:29:00 BST 2008


I have created a simple test case which triggers a likely bug in PyQt.
As the case demonstrates, I have a class template "PropertyValue"
which I wrap and use with QVariant. When I run the test program
("tst.py") however, there is a segfault in the PropertyValue copy
constructor. The reason as far as I've been able to tell is that PyQt
doesn't register its own metatype for "StringValue"
(PropertyValue<QString>), since this is already constructed for the
C++ type (see qobject.sip, line 1479), with chaotic results (the C++
copy constructor receives a raw PyObject for the right-hand-side
argument).

Arve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: case.tar
Type: application/x-tar
Size: 10240 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080902/cbe88ca3/case-0001.tar


More information about the PyQt mailing list