forked from g-sherman/GeoApt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
41 lines (28 loc) · 786 Bytes
/
Copy pathmain.py
File metadata and controls
41 lines (28 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python
# Sample directory view
# Copyright (C) 2008 Gary Sherman
# Licensed under the GNU GPL Version 2
# PyQt4 includes for python bindings to QT
from PyQt4.QtCore import *
from PyQt4.QtGui import *
# General system includes
import sys
# Main entry to program.
def main(argv):
# create Qt application
app = QApplication(argv,True)
# Set the app style
app.setStyle(QString("plastique"))
model = QDirModel()
tree = QTreeView()
tree.setModel(model);
tree.setWindowTitle("Dir View");
tree.resize(640, 480);
tree.show();
# Create signal for app finish
app.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))
# Start the app up
retval = app.exec_()
sys.exit(retval)
if __name__ == "__main__":
main(sys.argv)