I define a varible, name 'Decisoin_name' and set -1 at first
and I try to change it in a def of a class
because I’d like to add 1 everytime when I call the def
but the system send me a message
"local variable 'Decision_name' referenced before assignment"
what can I do?
Would you give me a solution to fix it ? thank you
The following is my code
Decision_name = -1
class Decision_Dialog(QDialog):
def sendback(self):
Decision_name+=1
print(Decision_name)
self.close()