In questa pagina

Ping-pong complesso con D-Bus

Dimostra l'utilizzo del sistema di tipi di Qt D-Bus.

L'esempio "Ping Pong complesso " illustra l'uso del Qt D-Bus sistema di tipi con QDBusVariant e QDBusReply. L'esempio è costituito dall'applicazione principale complexping che avvia l'altra applicazione, complexpong. L'inserimento di parole chiave come hello e ping viene gestito da complexpong e la risposta viene stampata sull'output standard.

Esecuzione dell’esempio

È possibile eseguire l’esempio da:

Per eseguire l’applicazione, lanciare complexping.

$ ./complexping
Ask your question: When is the next Qt release?
Reply was: Sorry, I don't know the answer
Ask your question: What is the answer to life, the universe and everything?
Reply was: 42

Progetto di esempio su code.qt.io

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.