Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
src_qdbus_qdbusinterface.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3#include <QDBusInterface>
4#include <QDBusReply>
5
7{
9QDBusInterface remoteApp( "com.example.Calculator", "/Calculator/Operations",
10 "org.mathematics.RPNCalculator" );
11remoteApp.call( "PushOperand", 2 );
12remoteApp.call( "PushOperand", 2 );
13remoteApp.call( "ExecuteOperation", "+" );
14QDBusReply<int> reply = remoteApp.call( "PopOperand" );
15
16if ( reply.isValid() )
17 printf( "%d", reply.value() ); // prints 4
19}
\inmodule QtDBus
QNetworkReply * reply
void DBusInterface_main()