-->
This page is being actively expanded as common questions come up again.
Make sure to also read the Item Size and Position and QML Language pages for questions related to
The main thing you can do to reduce the memory usage of a given configuration is to use loaders. Loaders can be used to create objects only when needed, and destroy them when not needed.
The Item.visible property can be used to change the visibility of an Item conditionally, as well as Loaders.
Note that you can change out a loader’s component conditionally:
Loader {
readonly property Component thing1: ...
readonly property Component thing2: ...
sourceComponent: condition ? thing1 : thing2
}
Rounded windows are simply transparent square ones with a rounded rectangle inside of them.
PanelWindow {
color: "transparent"
Rectangle {
// match the size of the window
anchors.fill: parent
radius: 5
color: "white" // your actual color
}
}
The Quickshell.iconPath() function has three variants:
Either of the last two variants can be used to avoid the purple/black square.
If you set a Rectangle’s color to "transparent"
and touch its border
property,
you’ll hit QTBUG-137166, which
causes everything under the transparent rectangle to become invisible.
Adding a definition like border.width: 0
seems to work around it, especially
if the only border property you wanted to set was radius.
If a window is created with an opaque background color, Quickshell will use a window surface format that is opaque, which reduces the amount of processing the gpu must do to draw it. If you change the background color of your window between opaque and transparent colors, this may affect you.
To tell Quickshell to always create a window capable of showing transparency,
use QsWindow.surfaceFormat to set opaque
to false.