title: Hide the checkbox from a QListView item
body: <p>I wave a <code>QListView</code> that is backed by a <code>QStandardItemModel</code>. Under certain circonstances, the <code>QStandardItem</code> are made checkable. A checkbox gets displayed besides the item's display. At some point, I want to remove hide the <code>QStandardItem</code> checkbox. I set its checkable state to false but it doesn't hide the checkbox (though it cannot be checked anymore).</p>
  
  <p>The only way I have found of hiding the checkbox is to replace the item with a new one. This doesn't seem the proper way to preceed.</p>
  
  <p>This is the code:</p>
  
  <pre><code>MyModel::MyModel(QObject *parent):QStandardItemModel(parent){}
  
  void MyModel::createItem(int row, const QString &amp;text)
  {
     setItem(row, new QStandardItem(text));
  }
  
  void MyModel::setCheckable(int row)
  {
     item(row)-&gt;setCheckState(Qt::Unchecked);
     item(row)-&gt;setCheckable(true); // A checkbox appears besides the text
  }
  
  void MyModel::hideCheckBox(int row)
  {
     item(row)-&gt;setCheckState(Qt::Unchecked);
     item(row)-&gt;setCheckable(false); // does not work
  
     // I need to completely replace the item for the checkbox to disapear.
     // This doesn't seem the proper way to proceed
     setItem(row, new QStandardItem(item(row)-&gt;data(Qt::DisplayRole).toString()));
  }
  </code></pre>
  
  <p>Is there better way to proceed?</p>