title: How to make QCheckBox readonly, but not grayed-out
body: <p>Any good way to make a checkbox readonly, but also <strong>not grayed-out</strong> (hardly visible).</p>
  
  <ol>
  <li>I have used <code>setEnabled(bool)</code> which works, but the checkbox then is grayed-out and hardly readable</li>
  <li>I can react on a toggle signal and reset the state. But I would need a kind of flag to determine if the box is read-only and then reset the check state, means I need to create my own <code>CheckBox</code> class.</li>
  <li><p><code>setCheckable</code> does not work either, it does not allow me to set a checked state at all:</p>
  
  <pre><code>    cb = this-&gt;ui-&gt;cb_RealWorld-&gt;isCheckable();
      this-&gt;ui-&gt;cb_RealWorld-&gt;setCheckable(true);
      this-&gt;ui-&gt;cb_RealWorld-&gt;setChecked(someValue);
      this-&gt;ui-&gt;cb_RealWorld-&gt;setCheckable(cb);
  </code></pre></li>
  </ol>
  
  <p>So the best thing I have is to use enable/disable and accept the grayed out style.</p>
  
  <p>------- Edit -------</p>
  
  <p>Following the <a href="http://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qcheckbox" rel="noreferrer">stylesheet examples</a> I was hoping I could set the style of a disabled checkbox like the one of an enabled. Failed so far to do so. More specific: Changing the icon like in the <a href="http://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qcheckbox" rel="noreferrer">examples</a> does not work for me, maybe because I am using Windows and the icons are not available under the path as in the examples.</p>
  
  <hr>
  
  <p>PS: Related, but no answer here</p>
  
  <p><a href="https://stackoverflow.com/q/8542123/356726">Disabling a QCheckbox in a tricky way</a><br>
  <a href="https://stackoverflow.com/q/24016264/356726">Qt - How to disable QCheckBox while retaining checked state?</a> </p>