@@ -3,10 +3,13 @@ title: "FAQ"
33description : " Frequently Asked Questions"
44index : 1000
55---
6- This page is being actively expanded as common questions come up again.
76
8- Make sure to also read the [ Item Size and Position] ( /docs/guide/size-position ) and
9- [ QML Language] ( /docs/guide/qml-language ) pages for questions related to
7+ > [ !NOTE]
8+ > This page is being actively expanded upon as more common questions come up.
9+ >
10+ > Make sure to also read the [ Item Size and Position] ( /docs/guide/size-position ) and
11+ > [ QML Language] ( /docs/guide/qml-language ) pages for questions related to
12+ > item sizing/positioning and QML in general.
1013
1114## Misc
1215
@@ -16,7 +19,7 @@ span the APIs exposed by Quickshell, as well as best practice across all
1619APIs, but will not change the language syntax or anything exposed by Qt.
1720
1821Most changes will be relatively trivial, though you may have to make the same
19- trivial change a great number of times if you have a large configuration.
22+ trivial change a considerable amount of times if you have a large configuration.
2023
2124Migration guides will be provided between each release version.
2225
@@ -27,7 +30,7 @@ single process.
2730## How do I
2831
2932### Make a rounded window
30- Rounded windows are simply transparent square ones with a rounded rectangle
33+ Rounded windows are simply transparent, square windows, with a rounded rectangle
3134inside of them.
3235
3336``` qml
@@ -46,11 +49,11 @@ inside of them.
4649
4750### Make a list of widgets
4851If you have a short list of items to display, such as a list of active music
49- players or system tray items, you want a @@QtQuick .Repeater, usually combined
50- with a @@QtQuick .Layouts.RowLayout or @@QtQuick .Layouts.ColumnLayout.
52+ players or system tray items, you want a @@QtQuick .Repeater, which is
53+ usually combined with a @@QtQuick .Layouts.RowLayout or @@QtQuick .Layouts.ColumnLayout.
5154
52- If you have a longer list, such as a list of entries in an application launcher,
53- or a list that needs to scroll , you may want a @@QtQuick .ListView instead.
55+ If you have a longer list, such as a list of entries in an application launcher
56+ or a list that needs to be scrolled , you want a @@QtQuick .ListView instead.
5457
5558### Run a program or script
5659Use @@Quickshell .Io.Process.
@@ -63,10 +66,15 @@ e.g. a command that listens to window manager IPC commands, use
6366@@Quickshell .Io.SplitParser to return each datum as it arrives.
6467
6568### Show widgets conditionally
66- The @@QtQuick .Item.visible property can be used to change the visibility of an
67- Item conditionally, as well as Loaders.
69+ Conditionally showing widgets can be done in two ways, simply using the @@QtQuick .Item.visible property,
70+ or by using a @@QtQuick .Loader.
71+
72+ Depending on your use case, both the @@QtQuick .Loader and the @@QtQuick .Item.visible property
73+ may make sense at equal complexity. If you want to unload a widget tree to save memory or
74+ speed up load times, then you should use Loaders.
75+
76+ Note that you can also change out a Loader's component conditionally:
6877
69- Note that you can change out a loader's component conditionally:
7078``` qml
7179@@QtQuick.Loader {
7280 readonly property Component thing1: ...
@@ -77,9 +85,9 @@ Note that you can change out a loader's component conditionally:
7785```
7886
7987### Round an image
80- The easiest way to round an image is with @@Quickshell .Widgets.ClippingWrapperRectangle.
81- ClippingWrapperRectangle is a [ MarginWrapper] component, which will attempt to match
82- the size of its contained item.
88+ The easiest way to round an image is with @@Quickshell .Widgets.ClippingWrapperRectangle,
89+ which is a [ MarginWrapper] component. This component will attempt to match the size of
90+ its contained item.
8391
8492``` qml
8593@@Quickshell.Widgets.ClippingWrapperRectangle {
@@ -97,7 +105,7 @@ the size of its contained item.
97105### Reference images and resources
98106By default, paths passed to components such as @@QtQuick .Image or
99107@@Quickshell .Io.FileView as strings are relative to Quickshell's working
100- directory. Usually this is not the desired behavior.
108+ directory. Usually, this is not the desired behavior.
101109
102110To get a file path relative to the current QML file, you can use @@QtQml .Qt.resolvedUrl().
103111
@@ -106,12 +114,12 @@ you can use @@Quickshell.Quickshell.cachePath(), @@Quickshell.Quickshell.dataPat
106114@@Quickshell .Quickshell.statePath(),
107115
108116### Add a drop-shadow
109- If you want a * rectangular* , * round rectangular* , or * circular* drop shadow,
110- use @@QtQuick .Effects.RectangularShadow.
111- For any other shape, you will have to use a @@QtQuick .Effects.MultiEffect.
117+ Use @@QtQuick .Effects.RectangularShadow if you want a * rectangular* , * round rectangular* ,
118+ or * circular* drop shadow.
112119
113- When using a MultiEffect, set @@QtQuick .Effects.MultiEffect.shadowEnabled,
114- as well as its other shadow and blur related properties.
120+ For any other shape, you will have to use a @@QtQuick .Effects.MultiEffect and set
121+ @@QtQuick .Effects.MultiEffect.shadowEnabled, as well as its other shadow and blur
122+ related properties.
115123
116124### Get rid of the purple/black icons
117125The @@Quickshell .Quickshell.iconPath() function has three variants:
@@ -127,19 +135,20 @@ however you can implement your own using @@Quickshell.Io.Socket or @@Quickshell.
127135which can be used to parse and send IPC messages.
128136
129137### Open/close windows with commands
130- Quickshell doesn't come with a command to open or close a window, however you can
131- make your own using @@Quickshell .Io.IpcHandler, which allows you to call functions
138+ Quickshell doesn't come with a command to open or close a window; however, you can
139+ make your own using @@Quickshell .Io.IpcHandler, allowing you to call functions
132140inside of Quickshell with a command. Said functions can change the
133141@@Quickshell .QsWindow.visible property of a window, or load/unload it using a
134142@@Quickshell .LazyLoader.
135143
136144### Reduce memory usage
137145The main thing you can do to reduce the memory usage of a given configuration
138- is to use loaders. Loaders can be used to create objects only when needed,
139- and destroy them when not needed.
146+ is to use Loaders.
140147
141- - Use @@QtQuick .Loader when the component being loaded inherits from @@QtQuick .Item.
142- - Use @@Quickshell .LazyLoader in other cases.
148+ Loaders can be used to create objects only when needed, and destroy them when not needed.
149+
150+ @@QtQuick .Loader should be used if the component being loaded inherits from @@QtQuick .Item,
151+ otherwise, a @@Quickshell .LazyLoader should be used.
143152
144153## Something is broken
145154
@@ -153,9 +162,11 @@ if the only border property you wanted to set was radius.
153162
154163### My window should not be opaque
155164If a window is created with an opaque background color, Quickshell will use
156- a window surface format that is opaque, which reduces the amount of processing
157- the gpu must do to draw it. If you change the background color of your window
158- between opaque and transparent colors, this may affect you.
165+ a window surface format that is opaque. This is done to reduce the amount of
166+ processing the gpu must do to draw it.
167+
168+ If you change the background color of your window between opaque and transparent colors,
169+ then this may affect you.
159170
160- To tell Quickshell to always create a window capable of showing transparency,
171+ To tell Quickshell that you want to create a window capable of showing transparency,
161172use @@Quickshell .QsWindow.surfaceFormat to set ` opaque ` to false.
0 commit comments