QDBusServer Class
A classe QDBusServer permite a comunicação ponto a ponto entre processos no mesmo computador. Mais...
| Cabeçalho: | #include <QDBusServer> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS DBus) target_link_libraries(mytarget PRIVATE Qt6::DBus) |
| qmake: | QT += dbus |
| Herdado de: | QObject |
Funções 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) |
Sinais
| void | newConnection(const QDBusConnection &connection) |
Documentação das funções de membro
[explicit] QDBusServer::QDBusServer(QObject *parent = nullptr)
Cria um QDBusServer com o ` parent` fornecido. O servidor ficará à espera de conexões em ` /tmp ` (em sistemas Unix) ou em uma porta TCP vinculada ao `localhost` (em outros sistemas).
[explicit] QDBusServer::QDBusServer(const QString &address, QObject *parent = nullptr)
Cria um QDBusServer com o address fornecido e o parent fornecido.
[virtual noexcept] QDBusServer::~QDBusServer()
Destrói um QDBusServer
QString QDBusServer::address() const
Retorna o endereço ao qual este servidor está associado.
bool QDBusServer::isAnonymousAuthenticationAllowed() const
Retorna `true` se a autenticação anônima for permitida.
Veja também setAnonymousAuthenticationAllowed().
bool QDBusServer::isConnected() const
Retorna ` true ` se este objeto ` QDBusServer ` estiver conectado.
Se não estiver conectado, é necessário chamar o construtor novamente.
QDBusError QDBusServer::lastError() const
Retorna o último erro ocorrido neste servidor.
Essa função é fornecida para código de baixo nível.
[signal] void QDBusServer::newConnection(const QDBusConnection &connection)
Esse sinal é emitido quando uma nova conexão de cliente connection é estabelecida com o servidor.
void QDBusServer::setAnonymousAuthenticationAllowed(bool value)
Se a opção ` value ` estiver definida como `true`, uma conexão recebida poderá prosseguir mesmo que o cliente que está se conectando não esteja autenticado como usuário.
Por padrão, esse valor é `false`.
Veja também 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.