title: QTreeView Edit UserRole Instead of DisplayRole Upon Double Click
body: <p>In my project, I have a <code>QTreeView</code> displaying items from a <code>QStandardItemModel</code>. Each item has data stored in several UserRoles.</p>
  
  <pre><code>QStandardItem* item = new QStandardItem();
  item-&gt;setIcon(iconByte);
  item-&gt;setData(3, Qt::UserRole+1);
  item-&gt;setData(name, Qt::UserRole+2);
  item-&gt;setData(data, Qt::UserRole+3);
  ... and so on
  </code></pre>
  
  <p>When the user double clicks on an item, a dialog with two line edits displays allowing the user to edit parts of the UserRole data. When editing ceases, the edits run through some logic and a display name is generated based on the new UserRole data.</p>
  
  <p>However, this gets very tedious very quickly. With dialogs constantly popping up and whatnot, it's a slow and ugly solution.</p>
  
  <p>I now would like to remove the dialog completely and show the line edit widgets WITHIN the item itself. By default, double clicking an item to edit it only shows one line edit widget to change the DISPLAY role. However I want two line edits to change the two USER roles. And then the normal logic continues.</p>
  
  <p>How would I go about modifying the edit item portion of a <code>QTreeView</code>?</p>
  
  <p>Thanks for your time!</p>