Qt提供瞭在 Qt 應用程序中實現 IPC (進程間通信) 的幾種辦法。
跨平颱 QtNetwork 模塊提供使網絡編程可移植且容易的類。它提供高級類 (如 QNetworkAccessManager , QFtp ) 使用特定應用程序級協議進行通信,和低級類 (如 QTcpSocket , QTcpServer , QSslSocket ) 為實現協議。
跨平颱共享內存類 QSharedMemory ,提供對操作係統共享內存實現的訪問。它允許通過多綫程和多進程,安全訪問共享內存段。此外, QSystemSemaphore 可以用於控製係統共享資源的訪問,及在進程之間通信。
The QtDBus 模塊是僅 Unix 庫,可使用 D-Bus 協議實現 IPC (進程間通信)。它擴展 Qt 的 信號和槽 mechanism to the IPC level, allowing a signal emitted by one process to be connected to a slot in another process. This D-Bus page has detailed information on how to use the QtDBus 模塊。
The QCopChannel class implements a protocol for transferring messages between client processes across named channels. QCopChannel is only available in Qt for Embedded Linux 。像 QtDBus module, QCOP extends Qt's 信號和槽 mechanism to the IPC level, allowing a signal emitted by one process to be connected to a slot in another process, but unlike QtDBus , QCOP does not depend on a third party library.