title: How to populate QTreeWidget from tuple?
body: <p>I'm pretty new to Python so please bear with me. I'm trying to populate a QTreeWidget from a tuple, but I can't seem to get it too work.</p>
  
  <pre><code>TreeList = ({
  
      'Header1': ((
          'Item1',
          'Item2',
      )),
  
      'Header2': ((
          'Item1',
          'Item2'
      ))
  })
  </code></pre>
  
  <p>The idea is that I want to create a QTreeWidget that looks like:</p>
  
  <pre><code>ROOT
    |
    |-- Header1
    |    |-- Item1
    |    |-- Item2
    |
    |-- Header2
         |-- Item1
         |-- Item2
  </code></pre>
  
  <p>I have been searching around online to find a solution, but nothing I try seems to work, what would be the best way to go about this.</p>
  
  <pre><code>widget = QTreeWidget()
  
  for i in TreeList:
      val = QTreeWidgetItem([i])
      widget.addTopLevelItem(val)
  
  for i in TreeList['Header1']
      val = QTreeWidgetItem([i])
      widget.Header1.addChild(val)  # DONT THINK THIS IS RIGHT
  
  for i in TreeList['Header2']
      val = QTreeWidgetItem([i])
      widget.Header2.addChild(val)  # DONT THINK THIS IS RIGHT
  </code></pre>
  
  <p>The first for-loop works, and the headers get listed under the root element, but the second two for-loops don't work at all. What am I doing wrong? I have sifted through the documentation and everything suggests that I should used addChild() but PyCharm says:</p>
  
  <blockquote>
    <p>'QTreeWidget' object has no attribute 'addChild'</p>
  </blockquote>
  
  <p>I'm using Python 3.6 with PyQt5. Thanks! </p>