このページでは

QDBus Namespace

QDBus 名前空間には、Qt D-Bus モジュール全体で使用されるさまざまな識別子が含まれています。詳細...

ヘッダー: #include <qdbusconnection.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS DBus)
target_link_libraries(mytarget PRIVATE Qt6::DBus)
qmake: QT += dbus

種類

enum CallMode { NoBlock, Block, BlockWithGui, AutoDetect }

詳細な説明

型のドキュメント

enum QDBus::CallMode

この列挙型は、関数呼び出しを行うさまざまな方法を定義しています。有効なモードは次のとおりです。

定数値説明
QDBus::NoBlock0呼び出しを実行するが、応答を待たない(応答の内容は破棄される)。
QDBus::Block1イベントループを使用して応答を待機せず、代わりに待機中にネットワーク操作でブロックします。これにより、関数が戻るまでユーザーインターフェースが更新されない可能性があります。
QDBus::BlockWithGui2Qt のイベントループを使用して応答を待ちます。これにより、ユーザーインターフェースは応答性を維持(入力イベントの処理)できますが、シグナルの配信やその他の D-Bus メソッド呼び出しなど、他のイベントが発生する可能性もあります。
QDBus::AutoDetect3呼び出された関数に返信があるかどうかを自動的に検出します。

BlockWithGui を使用する場合、アプリケーションはどの関数においても再入可能性に備えておく必要があります。

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