How to pass arguments to functions by the click of button in PyQt?

You can simply write

name = "user"
button.clicked.connect(lambda: calluser(name))

I tried an efficient way of doing it and it worked out well for me. You can use the code:

from functools import partial

def calluser(name):
    print name

def Qbutton():
    button = QtGui.QPushButton("button",widget)
    name = "user"
    button.setGeometry(100,100, 60, 35)
    button.clicked.connect(partial(calluser,name))