2011/1/6 机械唯物主义 : linjunhalida <[email protected]>:
> hello, I'm still creating wrapper for qwt..
> here is the issue:
> we have 2 class: QwtScaleDiv, QwtScaleEngine.
>
> in QwtScaleEngine, there is a pure virtual method:
> http://qwt.sourceforge.net/qwt__scale__engine_8h-source.html
>
> virtual QwtScaleDiv     divideScale (double x1, double x2, int
> maxMajSteps, int maxMinSteps, double stepSize=0.0) const =0
>
> and it returns QwtScaleDiv:
> http://qwt.sourceforge.net/qwt__scale__div_8h-source.html
>
> 00045     explicit QwtScaleDiv();
>
> and in qwtsacleengine_wrapper.cpp:
>
>
> QwtScaleDiv QwtScaleEngineWrapper::divideScale(double x1, double x2,
> int maxMajSteps, int maxMinSteps, double stepSize) const
> ...
>    if (py_override.isNull()) {
>
>        PyErr_SetString(PyExc_NotImplementedError, "pure virtual
> method 'QwtScaleEngine.divideScale()' not implemented.");
>        return 0;
>    }
>
> ok, then compile error:
>
> /data/workspace/pyside/pysideqwt/build/qwt/PySideQwt/qwtscaleengine_wrapper.cpp:
> In member function 'virtual QwtScaleDiv
> QwtScaleEngineWrapper::divideScale(double, double, int, int, double)
> const':
> /data/workspace/pyside/pysideqwt/build/qwt/PySideQwt/qwtscaleengine_wrapper.cpp:61:
> error: conversion from 'int' to non-scalar type 'QwtScaleDiv'
> requested
>
> hand edit return 0; -> return QwtScaleDiv(); OK,
> how could I fix it in xml?
> _______________________________________________
> PySide mailing list
> [email protected]
> http://lists.openbossa.org/listinfo/pyside
>

Hi,

if you're still there, put this inside the type system entry for QwtScaleEngine:

        <modify-function signature="divideScale(double, double, int,
int, double)">
            <modify-argument index="return">
                <replace-default-expression with="QwtScaleDiv()"/>
            </modify-argument>
        </modify-function>


Marcelo Lira
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside

Reply via email to