包装 C++ Qt 小部件以便在 Python 中使用 PySide [英] Wrapping C++ Qt widget for using in Python with PySide

查看:52
本文介绍了包装 C++ Qt 小部件以便在 Python 中使用 PySide的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Python 中使用自定义 Qt 显示小部件包装自定义 C++ 库以在基于 PySide 的 QApplication 中使用的最佳方法是什么?C++ 库是否需要特殊处理来包装 SWIG?封装的 Qt 小部件能否与 PySide 正确集成?

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.

推荐答案

用于为 Qt 生成 PySide 绑定的 Shiboken 绑定工具被证明是适合这项工作的工具.

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

此处概述了为自定义 C++ 库生成绑定的基本过程:http://lynxline.com/superhybrids-part-2-now-qt-pyside/

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

这篇关于包装 C++ Qt 小部件以便在 Python 中使用 PySide的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆