title: Using QSignalMapper
body: <p>I tried to make a simple example to help understand how the concept of QSignalMapping works in PySide. I would like to dynamically create a series of buttons by iterating through a loop, and when the user pushes one of the buttons, I can activate a method that returns the appropriate label for the button that was pressed.</p>
  
  <pre><code>from PySide2 import QtWidgets,QtCore,QtGui
  
  fruit_list = ["apples","oranges","pears"]
  
  def fruit_button_event():
      print "this is the pressed button's label"
  
  def main():
      for fruit in fruit_list:
          fruit_button = QtWidgets.QPushButton(fruit)
          fruit_button.clicked.connect(lambda:fruit_button_event())
  main()
  </code></pre>