Menu

complex static slots

Help
tom
2016-06-11
2016-06-11
  • tom

    tom - 2016-06-11

    Hi,
    What s the right way to implement a python static method for my-cpp-class wrapper?

    I saw the static_ prefix in the examples and it works e.g.

    myClass* static_myClass_open(QString);
    

    is accessible in python

    but what about a static method which return a Qlist<myClass*> ?

    I tried with

    QList<myClass*> static_QList_myClass_open(QString);
    

    but did not succeed.

    Is there a way to do this?

    Thanks a lot.

     

    Last edit: tom 2016-06-11
  • Florian Link

    Florian Link - 2016-06-11

    The name after static is always the classname of the class on which the method should appear and not the name of the return type. The result type can be any return type the PythonQt supports.

     
    • tom

      tom - 2016-06-11

      oh my bad...

      thanks a lot!

       

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.