title: Can I get a signal from a QGroupbox when one of the radiobuttons in it is changed?
body: <p>I'm making a user-interface in PYQT 5. It includes a QGroupBox containing several QRadioButton. When there is a toggled event I check the buttons and do some stuff. The problem is that there are two toggled events because one button is toggled on and one off so my code is always running twice.</p>
  
  <p>I have been looking for an event from the QGroupBox instead. That should only happen once instead of twice when i toggle a radiobutton.</p>
  
  <pre class="lang-py prettyprint-override"><code>    def __init__(self):
          self.radioButton1.toggled.connect(self.update_stimulus)
          self.radioButton2.toggled.connect(self.update_stimulus)
          self.radioButton3.toggled.connect(self.update_stimulus)
  
      def update_stimulus(self):
          if self.radioButton1.isChecked():
              print('1')
          if self.radioButton2.isChecked():
              print('2')
          if self.radioButton3.isChecked():
              print('3')
          # Do stuff based on button positions
  </code></pre>
  
  <p>I tried using</p>
  
  <pre class="lang-py prettyprint-override"><code>self.groupBox.toggled.connect(self.update_stimulus)
  </code></pre>
  
  <p>But that only works if the groupbox itself is toggled. Is there any way to get a signal from the groupbox when one of the radiobuttons changes or do I have to find some way of doing it with the indivdual signals from the radiobuttons?</p>