I'm trying to create a collapsible side panel similar to the one in Qt Designer (See attached screenshot). They appear to be QListViews placed in some sort of collapsible widget.
I googled for "Qt collapsible panel" and it seems that there is no standard component for this, or at least not under that name. So, does anyone know whether any standard Qt component has the same behavior? If not, can anyone suggests how I can go about building it?
Thanks.
I decided to follow the general approach laid out in the link provided by Joey.
Specifically, I created a widget for each collapsible list. This widget consists of a QPushButton at the top and a QListView at the bottom.
Then, I wired the button clicked signal to a handler to toggle the geometry of the QListView between having height of 0 when it is hidden and its original height when it reappears.
I find that this approach is much simpler compared to customizing the paint event as suggested by Claudio. Furthermore, I can use QAnimationProperty to animate the change in geometry to make the list appear to "slide" in and out of view.
But anyway thanks for the replies!