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
6
void
DBusInterface_main
()
7
{
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
19
}
QDBusInterface
\inmodule QtDBus
Definition
qdbusinterface.h:18
reply
QNetworkReply * reply
Definition
src_network_access_qhttpmultipart.cpp:26
DBusInterface_main
void DBusInterface_main()
Definition
src_qdbus_qdbusinterface.cpp:6
qtbase
src
dbus
doc
snippets
code
src_qdbus_qdbusinterface.cpp
Generated by
1.10.0