Ping-pong complexo do D-Bus
Demonstra o uso do sistema de tipos do Qt D-Bus.
O exemplo “Ping Pong complexo” demonstra o uso do Qt D-Bus sistema de tipos com ` QDBusVariant ` e ` QDBusReply`. O exemplo consiste no aplicativo principal ` complexping `, que inicia o outro aplicativo, ` complexpong`. A inserção de palavras-chave como ` hello ` e ` ping ` é processada pelo `complexpong`, e a resposta é exibida na saída padrão.
Executando o exemplo
Você pode executar o exemplo a partir de:
- Qt Creator
Abra o modo “ Welcome ” e selecione o exemplo em Examples. Para mais informações, consulte Qt Creator: Tutorial: Compilar e executar.
- Qt Extension for Visual Studio Code
Execute o comando ` Qt: Open Qt examples ` a partir de ` Command Palette` e selecione o exemplo na lista. Para mais informações, consulte Qt Extension for Visual Studio Code: Tutorial: Compilar e executar.
Para executar, inicie o aplicativo 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.