After tinkering some more with my code, using your example as a basis, I 
sort of get it to work... My bad on this :)

I do have a question though.. My company is using qt designer version 4.8.5 
which is pretty old, I guess?
Even so, when I was trying to get the list of widgets and its position 
within using the following code:
for i in range(self.layout().count()):
    item_name = self.layout().itemAt(i).objectName()
  print "Name - {}, Position - {}".format(item_name, i)

It seems to works for all other widgets with the exception of 
QHorizontalLayout and QVerticalLayout in which in the designer version I am 
using, it does not have a "objectName" field and hence it errors out for me 
as there are 2 instances where I am using the above mentioned layout each.

Luckily, while these 2 layouts are the top 2 widgets, I can use 
`self.layout().takeAt(0)` 
or `self.layout().takeAt(1)` and re-insert them to be the last second and 
third in position.

Even so, is there a better way that I can query the index?



-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/ae2d37a0-feeb-4e50-813d-716068552e01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to