#!/usr/bin/python
#--coding:GBK--
from PyQt4 import QtGui
if __name__ == '__main__':
import sys
app = QtGui.QApplication(sys.argv)
model = QtGui.QDirModel()
tree = QtGui.QTreeView()
tree.setModel(model)
tree.setAnimated(False) # 展开方式
tree.setIndentation(20) # 压痕
tree.setSortingEnabled(True) # 排序
tree.setWindowTitle("Dir View")
tree.resize(640, 480)
tree.show()
sys.exit(app.exec_())