[PyQt] Handling PyQT/PyKDE4 on ARM

David Boddie david at boddie.org.uk
Sun Dec 14 22:10:02 GMT 2008

On Sun Dec 14 20:47:06 GMT 2008, Michael Casadevall wrote:

> Internally, PyQT4 uses qreals in its bindings for QLists, and so
> forth. Although this works fine when qreal is a double since a float
> will be converted implicatively, when it is a float, it looses the
> ability to handle doubles since float is smaller than double. I
> believe the solution is to remove explicate qreals, and handle both
> float and double separately.

It's been a while since I did anything with this, but maybe you could
take a look at these rough-and-ready patches for PyQt 4.3:


What I did was to add checks for a PyQt "feature" called PyQt_FPU
which used MappedType declarations for double if enabled, or float
if disabled, for QList at least.

So, much the same as you describe, except that I continued to use qreal
in declarations because it should be appropriately defined, anyway.
Oh, and the patches also contain lots of other Features because I was
using Qtopia Core (as it used to be known) instead of Qt on X11.

> Secondly, in some cases, sip tries to pass double points into qreals,
> which breaks miserably on ARM. This happens when building plasma's
> bindings. This happens when building a widget derived from
> QGraphicsView, and that widget hasn't overridden getContetMargins.
> getContentMargins accepts four qreal pointers, and sip tries to pass
> in four double ones. I can provide the generated code in this
> instance.

I think you'll just have to handle this in the same way as for QList and

> I can provide access to relatively fast ARM hardware to help handle
> porting work and so forth, if anyone is interested in working on
> resolving this issue.

Having spent a fair amount of my own time on this sort of thing, I'd love to
be able to help but, sadly, I just don't have the time these days. I don't
mind sharing experiences and testing things, though, so feel free to let me
know how things are progressing.


More information about the PyQt mailing list