PyQt sending parameter to slot when connecting to a signal

前端 未结 5 1300
青春惊慌失措
青春惊慌失措 2020-12-02 18:37

I have a taskbar menu that when clicked is connected to a slot that gets the trigger event. Now the problem is that I want to know which menu item was clicked, but I don\'t

5条回答
  •  既然无缘
    2020-12-02 19:05

    use functools.partial

    otherwise you will find you cannot pass arguments dynamically when script is running, if you use lambda.

提交回复
热议问题