[PyQt] Problem with passing QString

Jarosław Białas jarekbialas.bialy at gmail.com
Fri Mar 2 12:59:30 GMT 2012


I have a library in C++ which use opencv-2.3.1. There is a function
that open image using path to file (I am using QString because it is
easier than converting to char*). Then I use some functions to
manipulate image. Finally I want to show image in GUI, so I
implemented function which convert IplImage* to QImage& (again, I
think it is the easiest way for me).
Everything worked fine, until I tried to build and run this project
under Debian.

When I try to call constructor with path to an image I get following error:

python: /build/buildd-sip4_4.13.2-1-amd64-oTGNAQ/sip4-4.13.2/siplib/siplib.c:7915:
sip_api_can_convert_to_type: Assertion `(((td)->td_flags & 0x0007) ==
0x0000) || (((td)->td_flags & 0x0007) == 0x0002)' failed.

Then I cut off all functions except constructor: my_class(QString&),
which is empty.
Problem still occures.

On 1st machine (Arch Linux x86_64) I have:

On 2nd (Debian x86_64):

Is this a bug or I should rather convert QString to char* and IplImage
to ... something?


More information about the PyQt mailing list