title: Using a checkbox in pyqt
body: <p>1) I have a checkbox called "ch_check" in my UI created with Qt designer that needs to be tested</p>
  
  <p>2) There is also a button, "bt_button", which triggers a simple function:</p>
  
  <pre><code>self.dlg.bt_button.clicked.connect(self.doCheck)
  </code></pre>
  
  <p>3) The function:</p>
  
  <pre><code>def doCheck(self):
      if ch_check.isChecked():
          self.dlg.le_text.setText("Hello")
      else:
          self.dlg.le_text.setText("Nope")
  </code></pre>
  
  <p>However I can't figure out how to reference the box properly. How would I do that? Do I need to connect the checkbox somehow first? All the examples I found so far use checkboxes to fire off functions and whatnot while completely ignoring this basic usage. I found this question but it's not answering how to address the existing checkbox: <a href="https://stackoverflow.com/questions/20455499/how-to-check-if-a-checkbox-is-checked-in-pyqt">How to check if a checkbox is checked in pyqt</a></p>