Quick update, since I got the problem fixed. The problem was that QVector3D is a container, and PySide needs to know how the user wants it converted once passed to the python side. I read the doc on containers, but I somehow conviced myself QList only was concerned.
Anyway the related doc is here: http://www.pyside.org/docs/apiextractor/typesystem_specifying_types.html#container-type And here's the typesystem.xml with the line that solved the problem: <?xml version="1.0"?> <typesystem package="PyCustomQWidget"> <load-typesystem name="typesystem_core.xml" generate="no"/> <load-typesystem name="typesystem_gui.xml" generate="no"/> <container-type name="QVector3D" type="vector"/> <object-type name="CustomQWidget"/> </typesystem> 'hope this will save some time to someone = ) Thanks for PySide by the way ! -- val On Wed, Nov 30, 2011 at 9:12 PM, Valentin Bisson <val.bis...@gmail.com>wrote: > Hi, > > I am building c++ bindings for a PySide application (subclassing a QWidget > to make a custom one). I use pyside 1.0.8, debian testing, and python 2.7. > The problem I have is that the imported module does not contain every > methods that the QWidget subclass defines. In particular, I noticed that > out of 4 methods with different signatures (see below), the one with the > QVector3D as arg would be missing from the QWidget subclass (also missing > from the wrapped cpp files). > > void no_arg(); > void prim_arg(int i); > void qvector3d_arg(QVector3D v); > void qstring_arg(QString s); > > The filesystem.xml file is pretty basic: > > <?xml version="1.0"?> > <typesystem package="PyCustomQWidget"> > <load-typesystem name="typesystem_core.xml" generate="no"/> > <load-typesystem name="typesystem_gui.xml" generate="no"/> > <object-type name="CustomQWidget"/> > </typesystem> > > I can use QVector3D's seamlessly. > > Here's the generatorrunner command I use, as well as its output: > http://pastebin.com/KspsEz4B (I can pastebin other info/files if needed). > > I don't understand why QVector3D methods are rejected with no apparent > warning (there aren't more relevant warnings with --debug-level=full), nor > how I can make them back in the shared object. > > Thanks, > > -- > val >
_______________________________________________ PySide mailing list PySide@lists.pyside.org http://lists.pyside.org/listinfo/pyside