title: How to get the selected item in a QTreeView
body: <p>I have a tree like this:  </p>
  
  <p>|-Parent<br>
  | |-Child-Child<br>
  |-Parent<br>
  | |-Child-Child<br>
  ...</p>
  
  <p>Only the Parents are selectable. How can I get the data from the selected Parent?  </p>
  
  <p>I tried</p>
  
  <pre><code>ui-&gt;treeView-&gt;selectedIndexes()[0];  
  </code></pre>
  
  <p>but it says that selectedIndexes() is protected.</p>