title: Ignore mouse and keyboard events in Qt
body: <p>In Qt, how can I ignore all mouse and keyboard events and later stop ignoring them? That is: click a button, ignore all events in children; click again, not ignore. Is that clear?
  I have the following lines, but maybe I'm doing something wrong:</p>
  
  <pre><code>setAttribute(Qt::WA_TransparentForMouseEvents);
  
  setFocusPolicy(Qt::NoFocus);
  </code></pre>