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
qdbusextratypes.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
4#include <QtCore>
5
6
7static QVariant callMyDBusFunction() { return QVariant(); }
8
9int main()
10{
11 QDBusMessage myDBusMessage;
12
14 QList<QVariant> arguments;
16 myDBusMessage.setArguments(arguments);
18
20 // call a D-Bus function that returns a D-Bus variant
22 // retrieve the D-Bus variant
23 QDBusVariant dbusVariant = qvariant_cast<QDBusVariant>(v);
24 // retrieve the actual value stored in the D-Bus variant
25 QVariant result = dbusVariant.variant();
27
28 return 0;
29}
\inmodule QtDBus
\inmodule QtDBus
\inmodule QtCore
Definition qvariant.h:65
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
Definition qvariant.h:536
static QVariant callMyDBusFunction()
int main()
QList< QVariant > arguments
GLsizei const GLfloat * v
[13]
GLuint64EXT * result
[6]