title: get all the data treeview?
body: <p>I need to get all the rows in an array. </p>
  
  <p>As it is, this code returns all the data from the treeview and all the items in array from the treeview. I don't think I have the correct method; how can I fix this?</p>
  
  <pre><code>from PyQt4 import QtGui, QtCore
  
  class Window(QtGui.QMainWindow):
      def __init__(self):
          QtGui.QMainWindow.__init__(self)
          self.model = QtGui.QStandardItemModel()
  
          self.view = QtGui.QTreeView()
  
          #self.view.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
          self.view.setModel(self.model)
          self.setCentralWidget(self.view)
          #parent = self.model.invisibleRootItem()
          self.model.setHorizontalHeaderLabels(["Referencia","Nombre","Costo","UND","Precio"])
  
          for item in '1234 name 9999 10000'.split():
              self.model.appendRow([QtGui.QStandardItem(item),QtGui.QStandardItem(item),QtGui.QStandardItem(item),
                                    QtGui.QStandardItem(item),QtGui.QStandardItem(item),
                                    ])
          #self.view.setColumnWidth(0,50)
  
  if __name__ == '__main__':
  
      import sys
      app = QtGui.QApplication(sys.argv)
      window = Window()
      window.show()
      sys.exit(app.exec_())
  </code></pre>