Re: Re: [PyQt] problem with sip

Bart. uzi18 at o2.pl
Sun Apr 1 17:17:25 BST 2007


> Date: Sat, 31 Mar 2007 23:31:11 +0000
> From: Phil Thompson <phil at riverbankcomputing.co.uk>
> Subject: Re: [PyQt] problem with sip
> To: pyqt at riverbankcomputing.com
> Message-ID: <200704010031.11123.phil at riverbankcomputing.co.uk>
> Content-Type: text/plain;  charset="utf-8"
> 
> On Saturday 31 March 2007 11:31 pm, Bart. wrote:
> > Hi Everyone!
> > My name is Bartek Zimon
> > It's my begining with PyQt 3 befor only pyuic (it works great :).
> >
> > I want to add python scripting to Qt Application Kadu (kadu.net).
> > 1. Is it possible to add python scripting to application using SIP ?
> >    I want to have access to (almost) all the classes of this
application.
> >    The module will be (if possible) in shared library and loaded if
user
> > want.
> >
> > >From now I've got lots of problems with SIP:
> >
> > 2. According to http://www.riverbankcomputing.com/Docs/sip4/sipref.html
> >   I'v created configure.py and kadu.sip (inside for tests definied only
> > class About : QHbox ) python configure.py didn't work because .:
> >   sip: Unable to find file "qt/qhbox.sip"
> >
> >   How to use sip to get sip files from /usr/share/sip ?
> 
> Use the -I command line flag. See...
> 
>
http://www.riverbankcomputing.com/Docs/sip4/sipref.html#the-sip-command-line
> 
> > 3. I've copy directory qt from /usr/share/sip to this directory and
> > now have errors like :
> >   sip: qt/qhbox.sip:40: Upper bound is not a time version
> >   sip: qt/qhbox.sip:40: Lower bound is not a time version
> >
> >   comandline : /usr/bin/sip -c . -b kadu.sbf kadu.sip
> >
> >   What's wrong? I think that sip dont know qt version.
> 
> So you need to tell it using the -t command line flag.
> 
> > 4. Why %Import qt/qtmod.sip gives Segmentation foult?
> >    In sipref.html looks like it must work.
> 
> You need to supply a bit more information...
> 
> Phil
> 
> 
> ------------------------------
> 
> _______________________________________________
> PyQt mailing list
> PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 
> End of PyQt Digest, Vol 33, Issue 1
> ***********************************

Thanks for answare. 
I've resolved problems 2,3,4.

This is good command line :
sip -c . -b kadu.sbf -I /usr/share/sip -x Qt_STYLE_INTERLACE -x
Qt_STYLE_PLATINUM -x VendorID -t WS_X11 -t Qt_3_3_6 kadu.sip

It was bad about.sip file. 
Now I have got kadu.sip which includes about.sip like qtmod.sip ;)

Because kadu have got plugins support (in shared libraries name_of_plugin.so
)
Do You think that I can use this system to prepare plugin python_scripting
with compiled objects from sip and scripts loaded to this plugin will have
access to entire application?

Bartlomiej Zimon




More information about the PyQt mailing list