Python 和Qt C++程序如何有效的通信
PHP中文网
PHP中文网 2017-04-17 17:52:32
0
1
397

python的快速开发确实是把好手,丰富的各种库文件
Qt C++做图形用户界面的开发也是非常顺手

后台python数据处理得到信息后,前台用户界面 Qt c++得到信息,显示出来

请教各位大神,有没有好一点的Qt c++程序和python程序进行通信的例子!
不要说使用PyQt就没这样的问题了,PyQt的Gui编程还是不太适应,感觉没有Qt c++方便

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
Ty80

You are talking about IPC, right? This has nothing to do with the specific program. As long as all programs are cross-process, there are only a few IPC methods, nothing more than
1) pipe
2) socket
3) memory mapping
4) Mail slot (can only be windows)
5) Others

Considering the current support of class libraries and operating systems, it is recommended that you use sockets and set a protocol in the middle, such as XMLRPC, and communication will be no problem.
http://qutexr.sourceforge.net/

xmlrpc for python below
https://docs.python.org/2/library/xmlrpclib.html

But having said that, PyQt is more convenient than Qt, really

Addition: Thrift has C++ and python versions, there are many examples of this

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template