![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtDBus More...
#include <qdbusextratypes.h>
Public Member Functions | |
QDBusVariant () noexcept | |
Constructs a new D-Bus variant. | |
QDBusVariant (const QVariant &variant) | |
Constructs a new D-Bus variant from the given Qt variant. | |
QDBusVariant (QVariant &&v) noexcept | |
void | swap (QDBusVariant &other) noexcept |
Swaps this QDBusVariant instance with other. | |
void | setVariant (const QVariant &variant) |
Assigns the value of the given Qt variant to this D-Bus variant. | |
QVariant | variant () const |
Returns this D-Bus variant as a QVariant object. | |
\inmodule QtDBus
The QDBusVariant class enables the programmer to identify the variant type provided by the D-Bus typesystem.
A D-Bus function that takes an integer, a D-Bus variant and a string as parameters can be called with the following argument list (see QDBusMessage::setArguments()):
When a D-Bus function returns a D-Bus variant, it can be retrieved as follows:
The QVariant within a QDBusVariant is required to distinguish between a normal D-Bus value and a value within a D-Bus variant.
Definition at line 125 of file qdbusextratypes.h.
|
inlinenoexcept |
Constructs a new D-Bus variant.
Definition at line 129 of file qdbusextratypes.h.
|
inlineexplicit |
Constructs a new D-Bus variant from the given Qt variant.
Definition at line 145 of file qdbusextratypes.h.
|
inlineexplicitnoexcept |
Definition at line 134 of file qdbusextratypes.h.
Assigns the value of the given Qt variant to this D-Bus variant.
Definition at line 148 of file qdbusextratypes.h.
|
inlinenoexcept |
Swaps this QDBusVariant instance with other.
Definition at line 136 of file qdbusextratypes.h.
References other(), and QVariant::swap().
|
inline |
Returns this D-Bus variant as a QVariant object.
Definition at line 140 of file qdbusextratypes.h.
Referenced by QXdgDesktopPortalTheme::QXdgDesktopPortalTheme(), main(), operator>>(), operator>>(), and QDBusAbstractInterfaceBase::qt_metacall().