标签:blog http io ar sp on 2014 log bs
import sys
from PyQt4.QtGui import *
class Browser(QWidget):
def __init__(self):
super(Browser, self).__init__()
self.resize(700, 600)
self.setWindowTitle("File Browser")
self.treeView = QTreeView()
self.fileSystemModel = QFileSystemModel(self.treeView)
self.fileSystemModel.setReadOnly(False)
root = self.fileSystemModel.setRootPath("/")
self.treeView.setModel(self.fileSystemModel)
self.treeView.setRootIndex(root)
Layout = QVBoxLayout(self)
Layout.addWidget(self.treeView)
self.setLayout(Layout)
if __name__ == "__main__":
app = QApplication(sys.argv)
main = Browser()
main.show()
sys.exit(app.exec_())
标签:blog http io ar sp on 2014 log bs
原文地址:http://www.cnblogs.com/mhxy13867806343/p/4163124.html