Menu

PythonQt and a Pointer-reference

Help
Tonka
2017-04-27
2017-04-27
  • Tonka

    Tonka - 2017-04-27

    Hey,

    is it possible to call a function with a pointer-reference or reference in it (return value in the signature). The binding works (but i can not create the correct signature), but i have no plan how i can create a reference in python (with PythonQt).

    f.e.

    void foo(MyClass*& oValue)...
    // or
    void foo(int& oValue)
    

    Is there any way to do that?

    Thanks in advance

     
  • Florian Link

    Florian Link - 2017-04-27

    No, that is just not possible and does not make sense when you consider that the original value in Python can't be changed because it is just an argument to a call.
    Just avoid these kind of APIs. You can remove such functions and replace them with your own, e.g. via decorators or by injecting them.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.