title: Checkbox to uncheck all other checkboxes
body: <p>I'm trying to put in some validation such that:</p>
  
  <ul>
  <li>When either <strong>"Select A"</strong> or <strong>"Select B"</strong> is checked, <strong>"None Selected"</strong> is automatically unchecked</li>
  <li>When "None Selected" is checked, both <strong>"Select A"</strong> and <strong>"Select B"</strong> are automatically unchecked</li>
  </ul>
  
  <p>But when I run this code, clicking any checkbox will uncheck <strong>all</strong> the 3 checkboxes.</p>
  
  <p>i.e. The window initializes with <strong>"None Selected"</strong> checked. But when I click <strong>"Select A"</strong>, it unchecks <strong>"None Selected"</strong>, which is intended, but <strong>"Select A"</strong> doesn't get checked.</p>
  
  <p>What am I doing wrong?</p>
  
  <hr>
  
  <pre><code>import sys
  import PyQt5
  
  class Test(QWidget):
      def __init__(self):
          super().__init__()
          self.initUI()
  
      def initUI(self):
          checkBoxNone = QCheckBox("None Selected")
          checkBoxA    = QCheckBox("Select A")
          checkBoxB    = QCheckBox("Select B")
  
          checkBoxNone.setChecked(True)
          checkBoxNone.stateChanged.connect(lambda checked: (checkBoxA.setChecked(False), checkBoxB.setChecked(False)))
          checkBoxA.stateChanged.connect(lambda checked: checkBoxNone.setChecked(False))
          checkBoxB.stateChanged.connect(lambda checked: checkBoxNone.setChecked(False))
  
          grid = QGridLayout()
  
          grid.addWidget(checkBoxNone, 1, 0)
          grid.addWidget(checkBoxA, 2, 0)
          grid.addWidget(checkBoxB, 3, 0)
  
          self.setLayout(grid)
          self.setWindowTitle('Test')
          self.show()
  
  if __name__ == '__main__':
      if not QApplication.instance():
          app = QApplication(sys.argv)
      else:
          app = QApplication.instance()
      ex = Test()
      sys.exit(app.exec_())
  </code></pre>