QDBusObjectPath Class | Qt D-Bus 6.4.1

- Qt 6.4
- Qt D-Bus
- C++ Classes
- QDBusObjectPath
- Qt 6.4.1 Reference Documentation

# QDBusObjectPath Class

The QDBusObjectPath class enables the programmer to identify the OBJECT_PATH type provided by the D-Bus typesystem. More...

Header: | #include <QDBusObjectPath>
CMake: | find_package(Qt6 REQUIRED COMPONENTS Dbus) target_link_libraries(mytarget PRIVATE Qt6::Dbus)
qmake: | QT += dbus

- List of all members, including inherited members

## Public Functions

| QDBusObjectPath(const QString &path)
| QDBusObjectPath(QLatin1StringView path)
| QDBusObjectPath(const char *path)
| QDBusObjectPath()
QString | path() const
void | setPath(const QString &path)
void | swap(QDBusObjectPath &other)
QVariant | operator QVariant() const

## Detailed Description

See also The Qt D-Bus Type System.

## Member Function Documentation

### QDBusObjectPath::QDBusObjectPath(const QString &path)

Constructs a new object path from the given path.

### QDBusObjectPath::QDBusObjectPath(QLatin1StringView path)

Constructs a new object path from the given path.

### QDBusObjectPath::QDBusObjectPath(const char *path)

Constructs a new object path from the given path.

See also setPath().

### QDBusObjectPath::QDBusObjectPath()

Constructs a new object path.

### QString QDBusObjectPath::path() const

Returns this object path.

See also setPath().

### void QDBusObjectPath::setPath(const QString &path)

Assigns the value of the given path to this object path.

See also path().

### void QDBusObjectPath::swap(QDBusObjectPath &other)

Swaps this QDBusObjectPath instance with other.

### `[since 5.14]` QVariant QDBusObjectPath::operator QVariant() const

Implicit cast to QVariant. Equivalent to calling QVariant::fromValue() with this object as argument.

This function was introduced in Qt 5.14.