[PySide] sender connect to multi slot
OisLone
oislone at ois.idv.tw
Thu Jun 5 18:38:06 CEST 2014
Hello ALL:
Now I can use methods like
def FuncA ():
print ("AAA")
def FuncB ():
print ("BBB")
q = QPushButton ("TEST")
q.clicked.connect (FuncA)
q.clicked.connect (FuncB)
I can use another way? Like Python List
For example:
def FuncA ():
print ("AAA")
def FuncB ():
print ("BBB")
q = QPushButton ("TEST")
lis = [FuncA, FuncB]
q.clicked.connect (lis)
Because only need to define a variable lis, I can set up multiple QPushButton's connect, if the need to change, can modify the lis only.
More information about the PySide
mailing list