This code works for a range of "Button_xx"
Selection=[]
for i in range(16):
Selection.append(getattr(tcDict.get("form"), "Button_%d" %(i+1)))
Selection[i].setEnabled(False)
Selection=[]
for i in range(16):
Selection.append(getattr(tcDict.get("form"), "Button_%d" %(i+1)))
Selection[i].setEnabled(False)
To copy to clipboard, switch view to plain text mode
What had me "stumped" was I forgot that the QT calls are "Functions" to which you "pass" a parameter not "set" a parameter.
that is: Selection[i].setEnabled = False will not work
My VB6 days getting in the way...
Bookmarks