QFrame
|- horLayout_01
|-|- buttonA
|- horLayout_02
|-|- LabelB
|-|- buttonB
|- horLayout_03
|-|- buttonC
|-|- buttonC# `mainInfoPanel` is the file that uses .ui file for setting all the signals within..
# `BasePanel` is the GUI created pythonically
import mainInfoPanel as mainInfoWidget
class infoPanel(BasePanel): def _build_ui(self, parent):
self._widget = mainInfoWidget(parent)
super(infoPanel, self)._build_ui(parent)QFrame
|- horLayout_01
|-|- buttonA
|- horLayout_03
|-|- buttonC
|-|- buttonC
|- horLayout_02
|-|- LabelB
|-|- buttonB
--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ee8c06f0-9627-4060-993b-80b9959926ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1106ccf4-3a45-4816-9ac4-a4ceb3627152%40googlegroups.com.
for i in range(self.layout().count()):
item_name = self.layout().itemAt(i).objectName() print "Name - {}, Position - {}".format(item_name, i)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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ae2d37a0-feeb-4e50-813d-716068552e01%40googlegroups.com.
It seems that these layouts and the spacerItem are returning me as None when I tried using `.widget()`
--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/3fa01ecd-1520-4b4e-bedb-da70bab7340b%40googlegroups.com.