[PySide] shiboken - wrapping function inside a namespace

Ryan rymg19 at gmail.com
Wed Jul 16 00:25:48 CEST 2014


I don't have a solution, but I can say that you're not the only one who gets bugged by that problem. From what I know, Qt itself has no namespace, so the PySide binding implementation doesn't have a solution.

iaio tom <iaiotom at hotmail.com> wrote:
>Hi,
>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()"/>
>  </namespace-type>
></typesystem>
>
>if I try something like this it doens't work:
><typesystem package="MyPkg">
><function signature="initFoo()"/>
></typesystem>
>
>or 
>
><typesystem package="MyPkg">
><function signature="Foo::initFoo()" rename="initFoo"/>
></typesystem>
>
>
>anyone know if there is a solution to this problem?
>
>Thank you
>Alan
>
>
> 		 	   		  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>PySide mailing list
>PySide at qt-project.org
>http://lists.qt-project.org/mailman/listinfo/pyside

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20140715/969bb8f0/attachment.html>


More information about the PySide mailing list