Hi,
I have a QFrame (Frame_ptr), and at run time i am creating a frames in loop
with child objects in that frame.
like
[code]
for i in range (1,5):
self.frame = QtGui.QFrame(self.Frame_ptr) # creating frame
as child in "Frame_prt" as discussed above
self.frame.setGeometry(QtCore.QRect(9, self.Record_Location, 575, 25))
self.frame.setMinimumSize(QtCore.QSize(575, 25))
self.frame.setMaximumSize(QtCore.QSize(575, 10))
self.frame.setFrameShape(QtGui.QFrame.NoFrame)
self.frame.setFrameShadow(QtGui.QFrame.Raised)
self.frame.setObjectName("Frame_" + i)
self.frame.show()
#Adding Button
self.pushButton = QtGui.QPushButton(i,self.frame)
#creating as child in above created frame
self.pushButton.setGeometry(QtCore.QRect(0, 0, 65, 25))
self.pushButton.setAutoFillBackground(False)
self.pushButton.setCheckable(True)
self.pushButton.setObjectName("Btn_" + i)
[/code]
now in maya if i use the below command it gives me error
[code]
for child1 in MainUi.Frame_1.children():
print child1.objectName()
# Error: AttributeError: 'Interface' object has no attribute 'Frame_012' #
[/code]
if i create the same in designer and use the same command i can retrieve
the details.
how to overcome this issue.
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe