En esta página

QDBusServer Class

La clase QDBusServer permite la comunicación entre pares entre procesos de un mismo ordenador. Más información...

Encabezado: #include <QDBusServer>
CMake: find_package(Qt6 REQUIRED COMPONENTS DBus)
target_link_libraries(mytarget PRIVATE Qt6::DBus)
qmake: QT += dbus
Heredado de: QObject

Funciones públicas

QDBusServer(QObject *parent = nullptr)
QDBusServer(const QString &address, QObject *parent = nullptr)
virtual ~QDBusServer()
QString address() const
bool isAnonymousAuthenticationAllowed() const
bool isConnected() const
QDBusError lastError() const
void setAnonymousAuthenticationAllowed(bool value)

Señales

void newConnection(const QDBusConnection &connection)

Descripción detallada

Documentación de las funciones de miembro

[explicit] QDBusServer::QDBusServer(QObject *parent = nullptr)

Crea un QDBusServer con el parent especificado. El servidor esperará conexiones en /tmp (en sistemas Unix) o en un puerto TCP vinculado a localhost (en el resto de sistemas).

[explicit] QDBusServer::QDBusServer(const QString &address, QObject *parent = nullptr)

Crea un QDBusServer con el address y el parent especificados.

[virtual noexcept] QDBusServer::~QDBusServer()

Destruye un QDBusServer

QString QDBusServer::address() const

Devuelve la dirección asociada a este servidor.

bool QDBusServer::isAnonymousAuthenticationAllowed() const

Devuelve «true» si se permite la autenticación anónima.

Véase también setAnonymousAuthenticationAllowed().

bool QDBusServer::isConnected() const

Devuelve ` true ` si este objeto ` QDBusServer ` está conectado.

Si no está conectado, debes volver a llamar al constructor.

QDBusError QDBusServer::lastError() const

Devuelve el último error que se ha producido en este servidor.

Esta función está pensada para código de bajo nivel.

[signal] void QDBusServer::newConnection(const QDBusConnection &connection)

Esta señal se emite cuando se establece una nueva conexión de cliente connection con el servidor.

void QDBusServer::setAnonymousAuthenticationAllowed(bool value)

Si la opción « value » se establece en «true», una conexión entrante podrá continuar aunque el cliente que se conecta no esté autenticado como usuario.

Por defecto, este valor es «false».

Véase también isAnonymousAuthenticationAllowed().

© 2026 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.