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:
- Qt Creator
Öffnen Sie den Modus „ Welcome “ und wählen Sie das Beispiel unter „ Examples “ aus. Weitere Informationen finden Sie unter Qt Creator: Tutorial: Erstellen und Ausführen.
- Qt Extension for Visual Studio Code
Führen Sie den Befehl „ Qt: Open Qt examples “ über „ Command Palette “ aus und wählen Sie das Beispiel aus der Liste aus. Weitere Informationen finden Sie unter Qt Extension for Visual Studio Code: Tutorial: Erstellen und 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© 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.