D-Bus Ping Pong
Demonstra um sistema simples de mensagens utilizando o D-Bus.
O Ping Pong é um exemplo de linha de comando que demonstra os fundamentos de Qt D-Bus. Uma mensagem é enviada para outro aplicativo e há uma confirmação da mensagem.
Executando o exemplo
Você pode executar o exemplo a partir de:
- Qt Creator
Abra o modo “ Welcome ” e selecione o exemplo em “ Examples ”. Para obter 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.
Execute o aplicativo ` pong ` e execute o aplicativo ` ping ` com a mensagem como argumento.
$ ./pong &
$ ./ping Hello
Reply was: ping("Hello") got called© 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.