New ctkCollapsibleButton in qt designer

Hello everyone !

I’m having trouble making my module’s interface.
I would like to add a new collapsible button but when I chose to add a ctkCollapsiblebutton with the widget box in qt designer, the button added is not the same as the one present by default.

The one present by default (the first one) doesn’t have any red sign and has a vertical layout already provided (the new one has not).

How can I have the same collapsible button as the one by default in the interface ? I’ve already tried to add a vertical layout to the new button but the results are not convincing…

Thanks !

Hi Marine,

By default, a ctkCollapsibleButton comes without a layout. So you are experiencing the correct behavior.

To set the layout, you should not use the Layout item in the left panel of Designer, but instead, you need to right click your ctkCollapsibleButton and select “Lay out” in the context menu.

Hth,
Julien.
p.s. if that still does not work, you can always copy/paste the existing collapsible button. And then remove its contents.

The right click thing didn’t work because even though I had the “lay out” in the context menu I couldn’t change it (it was “locked”).
But the copy/past worked, I had to disable the global layout in order to past the button and to enable it after. I’m new to qt designer and didn’t know you could copy/past widget like that.

Thanks for your help !