PySide6.QtDBus.QDBusPendingCall¶
- class QDBusPendingCall¶
- The - QDBusPendingCallclass refers to one pending asynchronous call.- Details- A - QDBusPendingCallobject is a reference to a method call that was sent over D-Bus without waiting for a reply.- QDBusPendingCallis an opaque type, meant to be used as a handle for a pending reply.- In most programs, the - QDBusPendingCallclass will not be used directly. It can be safely replaced with the template-based- QDBusPendingReply, in order to access the contents of the reply or wait for it to be complete.- The - QDBusPendingCallWatcherclass allows one to connect to a signal that will indicate when the reply has arrived or if the call has timed out. It also provides the- waitForFinished()method which will suspend the execution of the program until the reply has arrived.- Note - If you create a copy of a - QDBusPendingCallobject, all information will be shared among the many copies. Therefore,- QDBusPendingCallis an explicitly-shared object and does not provide a method of detaching the copies (since they refer to the same pending call)- See also - QDBusPendingReply- QDBusPendingCallWatcher- Inherited by: - QDBusPendingCallWatcher- Synopsis¶- Methods¶- def - __init__()
- def - error()
- def - isError()
- def - isFinished()
- def - isValid()
- def - reply()
- def - swap()
 - Static functions¶
- def - fromError()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - __init__(other)¶
- Parameters:
- other – - QDBusPendingCall
 
 - Creates a copy of the - otherpending asynchronous call. Note that both objects will refer to the same pending call.- error()¶
- Return type:
 
 - static fromCompletedCall(message)¶
- Parameters:
- message – - QDBusMessage
- Return type:
 
 - Creates a - QDBusPendingCallobject based on the message- msg. The message must be of type- ErrorMessageor- ReplyMessage(that is, a message that is typical of a completed call).- This function is useful for code that requires simulating a pending call, but that has already finished. - See also - static fromError(error)¶
- Parameters:
- error – - QDBusError
- Return type:
 
 - Creates a - QDBusPendingCallobject based on the error condition- error. The resulting pending call object will be in the “finished” state and- QDBusPendingReply<Types…>::isError() will return true.- See also - isError()¶
- Return type:
- bool 
 
 - isFinished()¶
- Return type:
- bool 
 
 - isValid()¶
- Return type:
- bool 
 
 - reply()¶
- Return type:
 
 - swap(other)¶
- Parameters:
- other – - QDBusPendingCall
 
 - Swaps this pending call instance with - other. This operation is very fast and never fails.- waitForFinished()¶