I want to pass the arguments to a function when I click the button. What should I add to this line button.connect(button, QtCore.SIGNAL(\'clicked()\'), calluser(name))
button.connect(button, QtCore.SIGNAL(\'clicked()\'), calluser(name))
You can simply write
name = "user" button.clicked.connect(lambda: calluser(name))