[PySide] shiboken - wrapping function inside a namespace

iaio tom iaiotom at hotmail.com
Sun Jul 13 23:54:15 CEST 2014

I've started to use shiboken to bind my cpp lib to python and I have a couple of questions related to the namespaces.
So from what I've seen if a use a namespace in .xml file definition, shiboken will create a class with the same name and it will use this class as namespace.
But, there is a way to bind a function ro a class that in my cpp code is in a namespace to a global function or class without namespace in python?

for example in my cpp code

namespace Foo
    void initFoo();

in shiboken the only way I found to export this function is this:
.xml file

<?xml version="1.0" encoding="utf-8"?>
<typesystem package="MyPkg">
  <namespace-type name="Foo">
    <function signature="initFoo()"/>

if I try something like this it doens't work:
<typesystem package="MyPkg">
<function signature="initFoo()"/>


<typesystem package="MyPkg">
<function signature="Foo::initFoo()" rename="initFoo"/>

anyone know if there is a solution to this problem?

Thank you

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20140713/96184faa/attachment.html>

More information about the PySide mailing list