1. If the function is called with no parameters monitor (start ())
Button.clicked.connect(start))
def strat():
...
2. If the listener called function parameters (start (x, y))
- Using lambda keyword
# start()参数列表
Button.clicked.connect(lambda:start(x,y))
def strat(x,y):
...
Note: If you do not use the lambda keyword, an error will be reported as follows:
TypeError: argument 1 has unexpected type 'NoneType'