QDBusObjectPath Class
QDBusObjectPath 类可让程序员识别 D-Bus 类型系统提供的 OBJECT_PATH 类型。更多
头文件: | #include <QDBusObjectPath> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS DBus) target_link_libraries(mytarget PRIVATE Qt6::DBus) |
qmake: | QT += dbus |
公共函数
QDBusObjectPath() | |
QDBusObjectPath(QLatin1StringView path) | |
QDBusObjectPath(const QString &path) | |
QDBusObjectPath(const char *path) | |
QString | path() const |
void | setPath(const QString &path) |
void | swap(QDBusObjectPath &other) |
QVariant | operator QVariant() const |
相关非成员
(since 6.8) QDebug | operator<<(QDebug dbg, const QDBusObjectPath &path) |
另请参阅 Qt D-Bus 类型系统。
成员函数文档
[noexcept]
QDBusObjectPath::QDBusObjectPath()
构造一个新的对象路径。
[explicit]
QDBusObjectPath::QDBusObjectPath(QLatin1StringView path)
根据path 查看的 Latin-1 字符串构建新的对象路径。
[explicit]
QDBusObjectPath::QDBusObjectPath(const QString &path)
从给定的path 构建一个新的对象路径。
[explicit]
QDBusObjectPath::QDBusObjectPath(const char *path)
从给定的path 构建一个新的对象路径。
另请参见 setPath().
QString QDBusObjectPath::path() const
返回此对象路径。
另请参见 setPath()。
void QDBusObjectPath::setPath(const QString &path)
将给定path 的值赋值给此对象路径。
另请参阅 path().
[noexcept]
void QDBusObjectPath::swap(QDBusObjectPath &other)
将此对象路径与other 互换。该操作速度非常快,而且从未出现过故障。
QVariant QDBusObjectPath::operator QVariant() const
QVariant等同于以该对象为参数调用QVariant::fromValue() 。
相关非成员
[since 6.8]
QDebug operator<<(QDebug dbg, const QDBusObjectPath &path)
将path 的内容写入dbg 。
此函数在 Qt 6.8 中引入。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.