RetainableLock: QtObject
import Quickshell
A helper for easily using Retainable. More
Properties
Signals
Detailed Description
A RetainableLock provides extra safety and ease of use for locking Retainable objects. A retainable object can be locked by multiple locks at once, and each lock re-exposes relevant properties of the retained objects.
Example
The code below will keep a retainable object alive for as long as the RetainableLock exists.
RetainableLock {
object: aRetainableObject
locked: true
}
Property Details
locked: bool
If the object should be locked.
object: QtObject
The object to lock. Must be Retainable.
[readonly]
retained: bool
If the object is currently in a retained state.
Signal Details
aboutToDestroy()
Rebroadcast of the object’s [signal] Retainable.aboutToDestroy().
dropped()
Rebroadcast of the object’s [signal] Retainable.dropped().