Widget that displays a directory tree?

Phil Thompson phil at riverbankcomputing.co.uk
Thu Jan 12 18:27:59 CET 2006

On Thursday 12 January 2006 4:55 pm, Edward C. Jones wrote:
> Do any of the Python GUIs have a super-high-level widget that displays a
> directory tree? Most file managers or editors have this type of window.

Below is the dirview.py example from the soon-to-be-released PyQt4. Snapshots 
are available, including a GPL binary package for Windows for use with the 
GPL version of Qt.


import sys
from PyQt4 import QtCore, QtGui

app = QtGui.QApplication(sys.argv)

model = QtGui.QDirModel()
tree = QtGui.QTreeView()

tree.setWindowTitle(tree.tr("Dir View"))
tree.resize(640, 480)


More information about the Python-list mailing list