Auf dieser Seite

D-Bus Complex Ping Pong

Veranschaulicht die Verwendung des Typsystems „ Qt D-Bus “.

Das Beispiel „Complex Ping Pong “ veranschaulicht die Verwendung des Qt D-Bus Typensystems mit QDBusVariant und QDBusReply. Das Beispiel besteht aus der Hauptanwendung complexping, die die andere Anwendung, complexpong, startet. Die Eingabe von Schlüsselwörtern wie hello und ping wird von complexpong verarbeitet und die Antwort wird auf die Standardausgabe ausgegeben.

Ausführen des Beispiels

Sie können das Beispiel wie folgt ausführen:

Um das Programm auszuführen, starten Sie die Anwendung „ 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

Beispielprojekt @ 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.