[PyQt] Next Releases of PyQt and SIP

Gerard Vermeulen gav451 at gmail.com
Tue Sep 8 06:34:55 BST 2009


On Mon, 07 Sep 2009 09:08:27 +0100
Phil Thompson <phil at riverbankcomputing.com> wrote:

> The current snapshots of PyQt4 and SIP should be considered release
> candidates, so now would be a good time to test against them.
> 
> The only outstanding problem I am aware of is the build problems on
> Snow Leopard - and I'm still waiting for my upgrade from Apple before
> I can fix that.
> 
When trying to build a deprecated version of PyQwt (for Qt-3 and a
version of Qwt incompatible with Qt-4), I ran into the following:

sipQwtpart0.cpp: In function ‘PyObject*
meth_QwtPlot_curveIterator(PyObject*, PyObject*)’:
sipQwtpart0.cpp:46123: error: cannot convert ‘QwtPlotCurveIterator’ to
‘QwtPlotCurveIterator*’ in assignment

where the generated code reads:

extern "C" {static PyObject *meth_QwtPlot_curveIterator(PyObject *,
PyObject *);}
static PyObject *meth_QwtPlot_curveIterator(PyObject *sipSelf, PyObject
*sipArgs)
{
    int sipArgsParsed = 0;

    {
        QwtPlot *sipCpp;

        if
        (sipParseArgs(&sipArgsParsed,sipArgs,"B",&sipSelf,sipType_QwtPlot,&sipCpp))
        {
            QwtPlotCurveIterator *sipRes;

            sipRes = sipCpp->curveIterator(); // *ERROR IN ASSIGNMENT*

            return
            sipConvertFromType(sipRes,sipType_QwtPlotCurveIterator,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipArgsParsed,sipName_QwtPlot,sipName_curveIterator);

    return NULL;
}

A snippet from the sip file is:

class QwtPlot: QFrame
{
%TypeHeaderCode
#include <qwt_plot.h>
%End // %TypeHeaderCode

public:
    ...
    QwtPlotCurveIterator curveIterator() const;
    ...
}; // class QwtPlot

where QwtPlotCurveIterator is a class defined by Qwt and also having a
SIP specification.

This problem is present with the latest SIP-snapshot but also with
SIP-4.8.2.

Regards -- Gerard




More information about the PyQt mailing list