I can register additional classes to be used from script by calling PythonQt::registerCPPClass with an individual package name.
to load them in script i must call
import PythonQt.<packagename>
or
from PythonQt.<packagename> import *
Now i want to to configure that my package is in a different "main" package like
import <myproduct>.<packagename>
is this possible somehow with PythonQt?
Intention is:
the packages could be also released "standalone" by using swig. Then the package name handling should be the same or each time some scripts must be adapted....
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
I can register additional classes to be used from script by calling PythonQt::registerCPPClass with an individual package name.
to load them in script i must call
import PythonQt.<packagename>
or
from PythonQt.<packagename> import *
Now i want to to configure that my package is in a different "main" package like
import <myproduct>.<packagename>
is this possible somehow with PythonQt?
Intention is:
the packages could be also released "standalone" by using swig. Then the package name handling should be the same or each time some scripts must be adapted....
You can use:
PythonQt::priv()->registerCPPClass("ClassName", "ParentName", NULL, NULL, NULL, module)
where module is a PyObject*.
You have to take care of creating that module using the Python C-API yourself.