SystemInhibitor QML Type

Inhibit system actions such as logout, suspend, etc. More...

Import Statement: import org.kde.guiaddons
Since: 6.23

Properties

Detailed Description

readonly property SystemInhibitor inhibitor: SystemInhibitor {
    window: ApplicationWindow.window
    types: SystemInhibitor.Suspend | SystemInhibitor.Idle
    enabled: true
    reason: KI18n.i18nc("inhibition reason", "Playing a video")
}

Property Documentation

enabled : bool

Toggle for enabling/disabling the inhibition. Please note that inhibiting is an asynchronous operation and may be delayed or fail, the property always reflects the requested state, not the actual state.


reason : string [required]

The user-facing reason why ths inhibition is in place (e.g. "Playing a video").


types : enumeration [required]

The types of inhibition to apply. May be a combination of multiple types.

ConstantDescription
SystemInhibitor.LogoutInhibit logout/shutdown
SystemInhibitor.UserSwitchInhibit user switching
SystemInhibitor.SuspendInhibit suspend/hibernate
SystemInhibitor.IdleInhibit idle actions (e.g. screen locking)

window : Window

The window for which to apply the inhibition. May be null in which case possible user queries will not be associated with any window.