On Tue, 21 Jul 2009 22:09:09 +0200, Gerard Vermeulen <[email protected]> wrote: > Phil, > > I have the following SIP specification : > > class QwtScaleTransformation > { > %TypeHeaderCode > #include <qwt_scale_map.h> > %End // %TypeHeaderCode > > public: > enum Type { > Linear, > Log10, > Other > }; // enum Type > > QwtScaleTransformation(QwtScaleTransformation::Type); > virtual ~QwtScaleTransformation(); > virtual double xForm(double, double, double, double, double) const; > virtual double invXForm(double, double, double, double, double) const; > QwtScaleTransformation::Type type() const; > virtual QwtScaleTransformation* copy() const /Factory/; > > private: > QwtScaleTransformation(const QwtScaleTransformation&); > > }; // class QwtScaleTransformation > > and when using the constructor in Python, I get the following traceback: > > Traceback (most recent call last): > File "zarko.py", line 20, in transformation > y = LoadScaleTransformation() > File "zarko.py", line 30, in __init__ > Qwt.QwtScaleTransformation.__init__(Qwt.QwtScaleTransformation.Linear) > TypeError: descriptor '__init__' requires a 'sip.simplewrapper' object > but received a 'Type' > > I suspect that this was working with PyQt-4.4.x and the corresponding > version of SIP, because this statement comes from a bug report of a > PyQwt user using Ubuntu Jaunty and the problem is somewhere else.
You aren't passing self... Phil _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
