Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
6
void
DBusInterface_main
()
7
{
8
//! [0]
9
QDBusInterface remoteApp(
"com.example.Calculator"
,
"/Calculator/Operations"
,
10
"org.mathematics.RPNCalculator"
);
11
remoteApp.call(
"PushOperand"
, 2 );
12
remoteApp.call(
"PushOperand"
, 2 );
13
remoteApp.call(
"ExecuteOperation"
,
"+"
);
14
QDBusReply<
int
> reply = remoteApp.call(
"PopOperand"
);
15
16
if
( reply.isValid() )
17
printf(
"%d"
, reply.value() );
// prints 4
18
//! [0]
19
}
DBusInterface_main
void DBusInterface_main()
Definition
src_qdbus_qdbusinterface.cpp:6
qtbase
src
dbus
doc
snippets
code
src_qdbus_qdbusinterface.cpp
Generated on
for Qt by
1.14.0