OverlayZStacking QML Type

An attached property that manages z-index for stacking overlays relative to each other. More...

Import Statement: import org.kde.kirigami
Since: 6.0

Attached Properties

  • layer : enumeration
  • z : real

Detailed Description

When a popup is about to show, OverlayZStacking object kicks in, searches for the next nearest popup in the QtQuick hierarchy of items, and sets its z value to the biggest of two: current stacking value for its layer, or parent's z index + 1.

This way OverlayZStacking algorithm ensures that a popup is always stacked higher than its logical parent popup, but also no lower than its siblings on the same logical layer.

import QtQuick.Controls as QQC2
import org.kde.kirigami as Kirigami

QQC2.Popup {
    Kirigami.OverlayZStacking.layer: Kirigami.OverlayZStacking.ToolTip
    z: Kirigami.OverlayZStacking.z
}

Attached Property Documentation

OverlayZStacking.layer : enumeration

The logical stacking layer of attachee popup, akin to window manager's layers.

ConstantValue
OverlayZStacking.DefaultLowest
OverlayZStacking.Drawer
OverlayZStacking.FullScreen
OverlayZStacking.Dialog
OverlayZStacking.Menu
OverlayZStacking.Notification
OverlayZStacking.ToolTip

OverlayZStacking.z : real

An optimal z-index that attachee popup should bind to.