title: How to immediately detect checkbox state change in a QTreeView?
body: <p>I'm using Qt 5.9 on linux. I have a QTreeView where I set a custom model which is derived from QAbstractItemModel and I fill the tree with several plain classes for the tree items. Each treeview item has a checkbox next to it.</p>
  
  <p>I have the following attribute set on the QTreeView ...</p>
  
  <pre><code>treeView-&gt;viewport()-&gt;setAttribute(Qt::WA_Hover);
  </code></pre>
  
  <p>so that when the mouse hovers over a tree item, I can capture the event via my delegates paint method.</p>
  
  <p>The problem is that I also have a checkbox in each tree item and I'd like to be able to capture when the state of the checkbox changes, but my delegate doesn't seem to capture that. I can tell what state the checkbox is in when I hover the mouse over the item, but what I want is to be able to immediately know when the state of the checkbox changes w/o having to move the mouse any further.</p>
  
  <p>Any thoughts on how to immediately detect when the state of the checkbox changes in a tree item?</p>