Feb-04-2018, 04:29 PM
Hey guys, I'm stumped on this issue.
I currently am referencing a UI file built in pyqt, and though it wise to create a while loop to iterate through the button commands. However, it seems to be pretty stubborn, and i'm not sure how to go about it.
#setAttr(self, "PoseSlot_32.clicked.connect()", self.printonetwoThree2)
stringPoseAttribute = "self.PoseSlot_" + str(iconEnumerator) + ".clicked.connect(self.printonetwoThree2)"
#eval(stringPoseAttribute)
and #getAttr Doesn't seem to be useful since it keeps returning invalid object
I currently am referencing a UI file built in pyqt, and though it wise to create a while loop to iterate through the button commands. However, it seems to be pretty stubborn, and i'm not sure how to go about it.
iconEnumerator = 0 #This works, since there is a PoseSlot_32 attribute. The button slots go from 0-32 self.PoseSlot_32.clicked.connect(self.printonetwoThree2) #This doesn't work (looping) while iconEnumerator >= 32: "self.PoseSlot_" + str(iconEnumerator) + ".clicked.connect(self.printonetwoThree2)" iconEnumerator += 1what is difficult is that i've tried
#setAttr(self, "PoseSlot_32.clicked.connect()", self.printonetwoThree2)
stringPoseAttribute = "self.PoseSlot_" + str(iconEnumerator) + ".clicked.connect(self.printonetwoThree2)"
#eval(stringPoseAttribute)
and #getAttr Doesn't seem to be useful since it keeps returning invalid object