Re: [PyQt] Problem with passing QString
I found out what the problem was. In configure.py I have: # Run SIP to generate the code. os.system(" ".join([config.sip_bin, "-c", ".", "-I/usr/share/sip -I/usr/include/QtGui/ -I/usr/include/QtCore/ -t WS_X11 -t Qt_4_6_0" , "-b", I changed Qt_4_6_0 to Qt_4_7_4 and now it works. Thanks for help and have a nice day:) -- Jarek > On Fri, 2 Mar 2012 13:59:30 +0100, Jarosław Białas > wrote: >> Hi, >> >> 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) == >> 0x) || (((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: >> PyQt-4.9.1-1 >> Qt-4.8.0-5 >> SIP-4.13.2-1 >> >> On 2nd (Debian x86_64): >> PyQt-4.9.1-1 >> Qt-4.7.4-2 >> SIP-4.13.2-1 >> >> Is this a bug or I should rather convert QString to char* and IplImage >> to ... something? > > Can you provide a short script that demonstrates the problem? > > Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Problem with passing QString
On Fri, 2 Mar 2012 13:59:30 +0100, Jarosław Białas wrote: > Hi, > > 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) == > 0x) || (((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: > PyQt-4.9.1-1 > Qt-4.8.0-5 > SIP-4.13.2-1 > > On 2nd (Debian x86_64): > PyQt-4.9.1-1 > Qt-4.7.4-2 > SIP-4.13.2-1 > > Is this a bug or I should rather convert QString to char* and IplImage > to ... something? Can you provide a short script that demonstrates the problem? Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Problem with passing QString
Hi, 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) == 0x) || (((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: PyQt-4.9.1-1 Qt-4.8.0-5 SIP-4.13.2-1 On 2nd (Debian x86_64): PyQt-4.9.1-1 Qt-4.7.4-2 SIP-4.13.2-1 Is this a bug or I should rather convert QString to char* and IplImage to ... something? -- Jarek ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt