Dバス・コンプレックス・ピンポン

Qt D-Bus 型システムの使用法を示す。

複雑なピンポンの例は Qt D-BustypesystemをQDBusVariantQDBusReply で使用する例です。この例はメイン・アプリケーションcomplexping で構成され、complexpong を起動します。helloping のようなキーワードの入力は complexpong によって処理され、返事は標準出力に出力されます。

例の実行

から例を実行するには Qt Creatorから例を実行するには、Welcome モードを開き、Examples から例を選択する。詳しくはQt Creator: チュートリアルを参照:ビルドして実行する

実行するには、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

サンプル・プロジェクト @ code.qt.io

© 2025 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.