Wrapping C++ Qt widget for using in Python with PySide

时光怂恿深爱的人放手 提交于 2019-12-10 10:29:04

问题


What is the best approach for wrapping a custom C++ library with custom Qt display widgets in Python for using in a PySide based QApplication? Does the C++ library need special treatment for wrapping with SWIG? Will wrapped Qt widgets integrate properly with PySide?

I would appreciate any comments on the appropriate nomenclature needed to refine my unsuccessful searches on this subject.


回答1:


The Shiboken bindings tool used to generate the PySide bindings for Qt turns out to be the right tool for the job.

The basic procedure for generating the bindings for a custom C++ library is outlined here: http://lynxline.com/superhybrids-part-2-now-qt-pyside/



来源:https://stackoverflow.com/questions/27047323/wrapping-c-qt-widget-for-using-in-python-with-pyside

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!