Is there an easy way to move splitters/ horizontal layouts up and down within a vertical widget? The only examples I’ve found use a tablelayout.
Here I have:
[ul]
[li]a top level gridlayout [/li][li]a scroll layout[/li][li]a tab layout[/li][li]a vert layout within the tab[/li][li]three dynamically created horizontal splitters[/li][/ul]
I want to give the user the ability to change the order of the splitters. I build the light list dynamically if there is lights in the scene. This will add them in order. I thought I could substitute lightTransforms for another list that moved the items but Im hoping there is a better way.
[B]def buildLightList(self):[/B]
lightShapes = cmds.ls(lights=True)
if lightShapes:
lightTransforms = cmds.listRelatives(lightShapes, p=True)
for i in lightTransforms:
you should be able to wrap the rows in a QWidget and then add those widgets to a vertical splitter within the tab layout. I just tried a simple test int eh designer and did as expected.
and I want to make it be something like this…I tried what I think your getting at and the only movement i get is with collapsable rows (which i turn off)
oh i see what you mean, you want to be able to sort the rows by light name (for example)? Did you want to have them drag them about? If thats the case then a vertical layout would work, you’d just have to reimplement the drag/drop events. You could probably do something with a QTreeView or like you mentioned before a QListView. Also, I would wrap the model in a QSortFilterProxyModel and then they could sort and filter light rows as they needed or the scene changed.