[PyQt] Wrap C++ QWidget Subclass for use in PyQt4

Tyler Distad tyler.distad at gmail.com
Tue Jul 29 16:00:33 BST 2008


On Mon, Jul 28, 2008 at 2:43 AM, kovid <kovid at kovidgoyal.net> wrote:
>
> There's a wrapped version in the calibre source tree (search for calibre on
> launchpad.net)
>
> Kovid.

I've downloaded and used the widget from Kovid's Calibre project
(http://launchpad.net/calibre). Unfortunately, the pictureflow widget
wrapped in that project seems to be an older version of Ariya
Hidayat's code. (http://code.google.com/p/pictureflow/) It's a rather
inefficient version: Using the python-wrapped version and the
cover_flow.py script from Calibre, loading 400 small images requires
342 MB of RAM.  Using Ariya's extensions to PictureFlow, that he has
named PhotoFlow (http://code.google.com/p/photoflow/), loading that
same directory requires only 11 MB. The actual file size of this
directory is 13.6 MB.

Because I seem utterly incapable of preparing proper SIP bindings, I
have completely translated Ariya's PhotoFlow code to Python. The only
piece I am lacking is a Python-wrapped version of the latest version
of pictureflow from http://code.google.com/p/pictureflow. However, I
cannot seem to bind his code no matter what I try. I believe my SIP
binding is written correctly and have attached it to this email, but
there seems to be something else wrong in either my configure.py or in
the readiness of the pictureflow code for binding.

If anyone can offer help or advice on how to bind the pictureflow
widget, I would be immensely grateful.

Tyler Distad

Both files I have attached are modified versions of Kovid's from the
Calibre source.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.py
Type: text/x-python
Size: 1599 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080729/58987898/configure.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pictureflow.sip
Type: application/octet-stream
Size: 1247 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080729/58987898/pictureflow.obj


More information about the PyQt mailing list