On Wednesday 29 December 2010 08:13:05 机械唯物主义 : linjunhalida wrote: > Hello, I'm creating pyside-qwt binding, here is the project: > http://gitorious.org/pysideqwt#more > > I'm new in shiboken, and everything is fine.... at first. > > here is the issue: QwtPlotItem is a virtual Class like this: > > class QWT_EXPORT QwtPlotItem: public QwtLegendItemManager > { > explicit QwtPlotItem(const QwtText &title = QwtText()); > virtual ~QwtPlotItem(); > .... > } > > after I create PySideQwt.so, I run this python code: > > class MyItem(QwtPlotItem): > pass > > and I got : > > TypeError: Error when calling the metaclass bases > type 'PySideQwt.QwtPlotItem' is not an acceptable base type
I found the problem.
QwtPlotItem has only one public constructor:
QwtPlotItem(const QwtText &title = QwtText())
and private copy constructors.
You aren't create bindings for QwtText yet, so the generator will skip this
public constructor, as the generator only see private constructors it'll tell
python that this type can't be instantiated by Python.
> sould I create a ~QwtPlotItem(){} ?
> _______________________________________________
> PySide mailing list
> [email protected]
> http://lists.openbossa.org/listinfo/pyside
--
Hugo Parente Lima
INdT - Instituto Nokia de Tecnologia
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ PySide mailing list [email protected] http://lists.openbossa.org/listinfo/pyside
