From pyqt4.qtgui import (qapplication, qcolumnview, qfilesystemmodel,
Qsplitter, qtreeview)
# Note
"""
The qcolumnview class provides the implementation of a model/View column view, inheriting q1_actitemview
Provides a data model for a local file system that inherits the q1_actitemmodel
Implements a shunt widget that inherits the qframe
Provides the implementation of a default model/view Tree View, inherits qabstractitemview, and inherits qhelpcontentwidget and qtreewidget
"""
Import sys
From pyqt4.qtcore import QT
Qtextcodec. setcodecfortr (qtextcodec. codecforname ("utf8 "))
If _ name __= = '_ main __':
APP = qapplication (SYS. argv)
Splitter = qsplitter () # display two parts with the same view
Model = qfilesystemmodel () # Display Module
Model. setrootpath (qdir. rootpath () # setrootpath any path
Views = []
For viewtype in (qcolumnview, qtreeview ):
View = viewtype (splitter) # Created in split view
View. setmodel (model) # view Model
View. setrootindex (model. Index (qdir. homepath () # Set the root index of the view as your home directory.
Splitter. Show () # display
Splitter. setwindowstate (QT. windowmaximized) # maximum allocation window
Sys.exit(app.exe C _ () # Start the main program
: