由于许可证,我必须选择PySide.但它的Shiboken工具缺乏文档.我无法成功为我的Qt C++库生成绑定.
看起来SIP至少在文档部分更成熟.我可以使用SIP生成绑定,然后在PySide上运行我的python代码来调用绑定吗?我的用户环境是Windows XP + Python 2.7 + PySide 1.1.2(基于Window安装程序,安装到C:\ Python27\Lib\site-packages\PySide).
我正在尝试调用一个调用的项目
find_package(Shiboken REQUIRED)
Run Code Online (Sandbox Code Playgroud)
cmake抱怨
CMake Error at CMakeLists.txt:5 (find_package):
By not providing "FindShiboken.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Shiboken",
but CMake did not find one.
Could not find a package configuration file provided by "Shiboken" with any
of the following names:
ShibokenConfig.cmake
shiboken-config.cmake
Add the installation prefix of "Shiboken" to CMAKE_PREFIX_PATH or set
"Shiboken_DIR" to a directory containing one of the above files. If
"Shiboken" provides a separate development package …Run Code Online (Sandbox Code Playgroud) 我希望我的函数返回错误代码和字符串值,因此计划使用return返回错误代码并使用参数返回字符串值.但它不起作用.看起来我们无法从函数参数返回值.知道如何从函数参数返回它吗?
下面是一个示例代码.我希望从sayHello的参数中得到retVal.
function sayHello(name, retVal) {
retVal = "hello " + name;
return 1;
}
Run Code Online (Sandbox Code Playgroud)