PyQt自定义部件在c ++ [英] PyQt custom widget in c++
本文介绍了PyQt自定义部件在c ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以在纯C ++中编写自定义Qt小部件,编译并在PyQt中使用吗?
Can I write custom Qt widget in pure C++, compile it and use in PyQt?
我试图使用ctypes-opencv与qt,
I'm trying to use the ctypes-opencv with qt and I have performance problems with python's code for displaying opencv's image in Qt form.
推荐答案
你需要为这个窗口部件编写一个Python包装器,使用 sip
库(由PyQt使用)。有一个简单示例用于Qt / C ++小部件。
You will have to write a Python wrapper for the widget, using the sip
library (which is used by PyQt). There is a simple example for a Qt/C++ widget in the documentation.
这篇关于PyQt自定义部件在c ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文