Mercurial > projects > qtd
comparison demos/interview/main.d @ 57:7be693ea7070
drcc, resource compiler, see interview demo
author | eldar |
---|---|
date | Tue, 19 May 2009 02:49:08 +0000 |
parents | e78566595089 |
children | a2871e6b8b15 |
comparison
equal
deleted
inserted
replaced
56:d5a6b6269f44 | 57:7be693ea7070 |
---|---|
46 import qt.gui.QTreeView; | 46 import qt.gui.QTreeView; |
47 import qt.gui.QListView; | 47 import qt.gui.QListView; |
48 import qt.gui.QIcon; | 48 import qt.gui.QIcon; |
49 import qt.gui.QPixmap; | 49 import qt.gui.QPixmap; |
50 | 50 |
51 extern(C) int qtd_init_resources_interview(); | |
52 static this() { | |
53 qtd_init_resources_interview(); | |
54 } | |
51 | 55 |
52 int main(char[][] args) | 56 int main(char[][] args) |
53 { | 57 { |
54 // Q_INIT_RESOURCE(interview); | |
55 | |
56 scope app = new QApplication(args); | 58 scope app = new QApplication(args); |
57 scope page = new QSplitter; | 59 scope page = new QSplitter; |
58 | 60 |
59 scope data = new Model(1000, 10); //parent = page | 61 scope data = new Model(1000, 10); //parent = page |
60 scope selections = new QItemSelectionModel(data); | 62 scope selections = new QItemSelectionModel(data); |
86 list.setAlternatingRowColors(false); | 88 list.setAlternatingRowColors(false); |
87 list.viewport.setAttribute(Qt.WA_StaticContents); | 89 list.viewport.setAttribute(Qt.WA_StaticContents); |
88 list.setAttribute(Qt.WA_MacShowFocusRect, false); | 90 list.setAttribute(Qt.WA_MacShowFocusRect, false); |
89 page.addWidget(list); | 91 page.addWidget(list); |
90 | 92 |
91 page.setWindowIcon(new QIcon(new QPixmap("images/interview.png"))); | 93 page.setWindowIcon(new QIcon(new QPixmap(":/images/interview.png"))); |
92 page.setWindowTitle("Interview"); | 94 page.setWindowTitle("Interview"); |
93 page.show(); | 95 page.show(); |
94 | 96 |
95 return app.exec(); | 97 return app.exec(); |
96 } | 98 } |