The QExpansionItem component allows the hiding of content that is not immediately relevant to the user. Think of them as accordion elements that expand when clicked on. It’s also known as a collapsible.
They are basically QItem components wrapped with additional functionality. So they can be included in QLists and inherit QItem component properties.
Usage
Basic
Controlling expansion state
Style
Options
When dealing with inset levels, a general rule of thumb is that header-inset-level
adds left padding to header while it doesn’t do anything with the content, while content-inset-level
adds left padding to the content.
Behavior
TIP
The behavior below of toggling by expand icon only is especially useful when having a route attached to the header of QExpansionItem. This way by clicking header it will activate the route and by clicking the expand icon it will, well, expand the content. You can’t have both actions attached to the whole header, obviously.