Qt portable IPC: only QSharedMemory?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 18:19:18

Take a look at Boost.Interprocess which provides a lot of IPC functionality. I have used the interprocess message_queue that provides a pretty clean and easy way to do what I think you want to do.

You can use QLocalSocket and QlocalServer for IPC too. Those two classes are really easy to use and they can be implemented ~almost the same way as you would using Qt TCP socket client/server.

You can take a look at some of these youtube videos:

QTCPServer - a basic TCP server application

QTcpServer using multiple threads

(Almost the sames principles would apply for "Local" server/client instead of "TCP")

As Qt 5.9, there is module which is currently under technology preview name QtRemoteObjects which provides Qt native IPC for QObjects, its easy to use and could be used to share signal/slots and also models between two processes.

Its works well for Linux, Windows and android

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