2011/2/9 机械唯物主义 : linjunhalida <linjunhal...@gmail.com>:
> hello, I'm still creating pysideqwt binding, and shiboken didn't
> create a wrapper class
> for QwtScaleDiv: http://qwt.sourceforge.net/qwt__scale__div_8h-source.html
>
> and in other class, QwtScaleDiv is a return value, and it cause compile error:
>
> /data/workspace/pyside/pysideqwt/build/qwt/PySideQwt/qwtscaleengine_wrapper.cpp:59:
> error: conversion from ‘int’ to non-scalar type ‘QwtScaleDiv’
> requested
>
> so when shiboken creates a class wrapper? any doc? thanks.
> _______________________________________________
> PySide mailing list
> PySide@lists.openbossa.org
> http://lists.openbossa.org/listinfo/pyside
>

Shiboken creates a Python wrapper to all classes found in the headers
and declared in the type system as "object-type" or "value-type".
Sometimes it makes sense to declare a C++ class as a "primitive-type"
(e.g.: PySide does this with QBool).
There is also the internal C++ wrapper that is generated only when the
class has virtual methods, or when it has protected methods and the
"avoid protected hack" is turned off.

In summation, check how you declared the QwtScaleDiv on the type
system (it seems to be a "value-type").


Marcelo Lira
_______________________________________________
PySide mailing list
PySide@lists.openbossa.org
http://lists.openbossa.org/listinfo/pyside

Reply via email to