I understand it in theory but I've just never seen an example of a custom widget being written. Is it just a new class that inherits QtWidget and I populate it with the objects that I want? Then insert instances of that class into my layout?
On Wednesday, May 27, 2020 at 11:20:46 PM UTC+2, Justin Israel wrote: > > > If you can't fine an existing example of an "accordion" layout/widget, and > you wanted to create from from scratch, I would suggest creating a widget > that has a vertical layout. The first item would be your title bar, which > contain a swizzle/triangle type icon. The second item in the layout would > probably be a QScrollWidget if you want the layout to handle automatically > scrolling. Or it could be a QStackedWidget if you want to to set any widget > into it, which may already be a scroll widget. Then you can wire up your > swizzle button to toggle the visibility of the main content widget. > When these individual layout items are added to another vertical layout, > with either a top alignment, or having a stretcher added as the last item, > the toggling of the accordion items will cause them to compress up to the > top. > > Justin > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/5b14b7fb-3be2-43bb-8141-ccdc86019fd9%40googlegroups.com.