Quickshell


WrapperItem: Item

import Quickshell.Widgets

This component is useful when you need to wrap a single component in an item, or give a single component a margin. See QtQuick.Layouts for positioning multiple items.

NOTE

WrapperItem is a MarginWrapperManager based component. You should read its documentation as well.

Example: Adding a margin to an item

The snippet below adds a 10px margin to all sides of the Text item.

WrapperItem {
  margin: 10

  Text { text: "Hello!" }
}

NOTE

The child item can be specified by writing it inline in the wrapper, as in the example above, or by using the Go to child property. See Go to WrapperManager.child for details.

WARNING

You should not set Go to Item.x, Go to Item.y, Go to Item.width, Go to Item.height or Go to Item.anchors on the child item, as they are used by WrapperItem to position it. Instead set Go to Item.implicitWidth and Go to Item.implicitHeight.

  • child Item
  • margin real

    The minimum margin between the child item and the WrapperItem’s edges. Defaults to 0.

  • resizeChild bool

    If the child item should be resized larger than its implicit size if the WrapperItem is resized larger than its implicit size. Defaults to false.