title: How to add n number of buttons with functionality in PyQt5?
body: <p>I was trying to make an answer checking app in PyQt5. I decided to code it instead of designing in Qt designer as the number of questions may change according to the situation.</p>
  <p>I tried creating it using for loop. And it looks like this.
  <a href="https://i.stack.imgur.com/Ig6S1.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>As in the image, I need option A, B, C and D with n number of questions. But I am adding it with for loop I am unable to detect which button is pressed.</p>
  <p>The code I used is this.</p>
  <pre><code>for i in range(1, 11):
      self.label = QLabel(self)
      self.label.setText(f'{i}.')
      self.label.move(self.x, (self.y+2)*i-50)
      
      self.buttonA = QPushButton(self)
      self.buttonA.setText('A')
      self.buttonA.move(self.x+100, self.y*i-50)
      
      self.buttonB = QPushButton(self)
      self.buttonB.setText('B')
      self.buttonB.move(self.x+200, self.y*i-50)
      
      self.buttonC = QPushButton(self)
      self.buttonC.setText('C')
      self.buttonC.move(self.x+300, self.y*i-50)
      
      self.buttonD = QPushButton(self)
      self.buttonD.setText('D')
      self.buttonD.move(self.x+400, self.y*i-50)
      
    self.buttonA.clicked.connect(self.highlite)
  </code></pre>
  <p>And self.highlite looks like this.</p>
  <pre><code>def highlite(self):
      self.buttonA.setStyleSheet('background-color : yellow;')
  </code></pre>