title: How to use QColumnView to display multiple columns of data
body: <p>I want to display data in multiple columns in a QColumnView. I am using Qt Creator and Qt 4 for development.</p>
  
  <p>Consider an address book application where you have multiple groups: Group 1, Group 2, etc. Your contacts can belong to any of those groups.</p>
  
  <pre><code>Group 1:
      John Smith
      Pocahontas
  Group 2:
      Chief Powhatan
  Group 3:
      ...
  </code></pre>
  
  <p>When a group in the first column is selected, the second column will show all contacts in that group, and when a contact is selected, their personal information is shown in a third column.</p>
  
  <p>I have tried the following (based on an example from Qt Documentation):</p>
  
  <pre><code>QStringList strList1;
  strList1 &lt;&lt; "Group 1" &lt;&lt; "Group 2" &lt;&lt; "Group 3";
  
  strListM1 = new QStringListModel(); // Previously declared as QStringListModel *strListM1
  strListM1-&gt;setStringList(strList1);
  ui-&gt;columnView-&gt;setModel(strListM1);
  </code></pre>
  
  <p>However, I have not been able to figure out how to add more columns, and add the contact names as children of those groups in the first column.</p>
  
  <p>How can I do this? How could I add columns and rows dynamically (instead of using the QStringList like above, or any other similar method for rows)?</p>