Need help inserting something in Qt tree view with python
shizzo last edited by
I want to get a Tree View running with PySide for that i used Qt Designer to get the window.
To compile my GUI code into Python code i used the pyuic compiler and i got a form.py
which is a module containing my dialog as a Python class and looks like this:
def setupUi(self, SleuthGUI):
self.tvDirTree = QtGui.QTreeView(self.centralwidget)
self.tvDirTree.setGeometry(QtCore.QRect(20, 120, 311, 451))
Now i didn't know how to write the python code to insert something in my treeview.
I tried plenty of things wich i found on the internet but nothing worked.
PyQt4 and PySide are installed.
@from PySide import QtGui, QtCore
from sleuthGUI_ui import Ui_SleuthGUI
items = 
for i in range(10):
items.append(QtGui.QTreeWidgetItem(None, QStringList(QString('item: %1').arg(i))))
Another Problem is that PySide does not know QStringList or QString so i tried it with PyQt4.
But i could not insert anything.
Could anybody help me please?