<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- complexpingpong.qdoc --> <title>D-Bus Complex Ping Pong Example | Qt D-Bus</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.12</td><td ><a href="qtdbus-index.html">Qt D-Bus</a></td><td ><a href="examples-dbus.html">Qt D-Bus Examples</a></td><td >D-Bus Complex Ping Pong Example</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right"><a href="qtdbus-index.html">Qt 5.12.2 Reference Documentation</a></td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#running-the-example">Running the Example</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">D-Bus Complex Ping Pong Example</h1> <span class="subtitle"></span> <!-- $$$complexpingpong-brief --> <p>Demonstrates usage of the Qt D-Bus typesystem.</p> <!-- @@@complexpingpong --> <!-- $$$complexpingpong-description --> <div class="descr"> <a name="details"></a> <p><i>Complex Ping Pong Example</i> demonstrates the use of <a href="qtdbus-index.html">Qt D-Bus</a> typesystem with <a href="qdbusvariant.html">QDBusVariant</a> and <a href="qdbusreply.html">QDBusReply</a>. The example consists of the main application <code>complexping</code> which starts the other application, <code>complexpong</code>. Entering keywords such as <code>hello</code> and <code>ping</code> is handled by complexpong and the reply is printed to the standard output.</p> <a name="running-the-example"></a> <h2 id="running-the-example">Running the Example</h2> <p>To run the example from Qt Creator, open the <b>Welcome</b> mode and select the example from <b>Examples</b>. For more information, visit Building and Running an Example.</p> <p>To run, execute the <code>complexping</code> application.</p> <pre class="cpp plain"> $ ./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 </pre> <p>Files:</p> <ul> <li><a href="qtdbus-complexpingpong-complexping-cpp.html">complexpingpong/complexping.cpp</a></li> <li><a href="qtdbus-complexpingpong-complexping-h.html">complexpingpong/complexping.h</a></li> <li><a href="qtdbus-complexpingpong-complexping-pro.html">complexpingpong/complexping.pro</a></li> <li><a href="qtdbus-complexpingpong-complexpingpong-pro.html">complexpingpong/complexpingpong.pro</a></li> <li><a href="qtdbus-complexpingpong-complexpong-cpp.html">complexpingpong/complexpong.cpp</a></li> <li><a href="qtdbus-complexpingpong-complexpong-h.html">complexpingpong/complexpong.h</a></li> <li><a href="qtdbus-complexpingpong-complexpong-pro.html">complexpingpong/complexpong.pro</a></li> <li><a href="qtdbus-complexpingpong-ping-common-h.html">complexpingpong/ping-common.h</a></li> </ul> </div> <!-- @@@complexpingpong --> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br/> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br/> 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. </p> </div> </body> </html>