|
1 <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> |
|
2 <class>Form1</class> |
|
3 <include location="global" impldecl="in implementation">qdatetime.h</include> |
|
4 <variable>QListViewItem *item;</variable> |
|
5 <widget class="QDialog"> |
|
6 <property name="name"> |
|
7 <cstring>Form1</cstring> |
|
8 </property> |
|
9 <property name="geometry"> |
|
10 <rect> |
|
11 <x>0</x> |
|
12 <y>0</y> |
|
13 <width>281</width> |
|
14 <height>455</height> |
|
15 </rect> |
|
16 </property> |
|
17 <property name="caption"> |
|
18 <string>Form1</string> |
|
19 </property> |
|
20 <vbox> |
|
21 <property name="name"> |
|
22 <cstring>unnamed</cstring> |
|
23 </property> |
|
24 <property name="margin"> |
|
25 <number>11</number> |
|
26 </property> |
|
27 <property name="spacing"> |
|
28 <number>6</number> |
|
29 </property> |
|
30 <widget class="QLineEdit"> |
|
31 <property name="name"> |
|
32 <cstring>number</cstring> |
|
33 </property> |
|
34 </widget> |
|
35 <widget class="QListView"> |
|
36 <column> |
|
37 <property name="text"> |
|
38 <string>Column 1</string> |
|
39 </property> |
|
40 <property name="clickable"> |
|
41 <bool>true</bool> |
|
42 </property> |
|
43 <property name="resizeable"> |
|
44 <bool>true</bool> |
|
45 </property> |
|
46 </column> |
|
47 <property name="name"> |
|
48 <cstring>listview</cstring> |
|
49 </property> |
|
50 </widget> |
|
51 </vbox> |
|
52 </widget> |
|
53 <connections> |
|
54 <connection> |
|
55 <sender>number</sender> |
|
56 <signal>returnPressed()</signal> |
|
57 <receiver>Form1</receiver> |
|
58 <slot>doInsert()</slot> |
|
59 </connection> |
|
60 <slot access="protected" language="C++" returnType="void">init()</slot> |
|
61 <slot access="protected" language="C++" returnType="void">destroy()</slot> |
|
62 <slot access="public" language="C++" returnType="void">doInsert()</slot> |
|
63 </connections> |
|
64 <functions> |
|
65 <function name="init()" >{ |
|
66 qDebug( "here" ); |
|
67 item = 0; |
|
68 }</function> |
|
69 <function name="destroy()" >{ |
|
70 |
|
71 }</function> |
|
72 <function name="doInsert()" >{ |
|
73 item = new QListViewItem( listview, "Hallo" ); |
|
74 item->setOpen( TRUE ); |
|
75 listview->clear(); |
|
76 int num = number->text().toInt(); |
|
77 QTime t; |
|
78 t.start(); |
|
79 qDebug( "start" ); |
|
80 for ( int i = 0; i < num; ++i ) |
|
81 (void)new QListViewItem( listview, "Item " ); |
|
82 qDebug( "end items: %d took %d msec", num, t.elapsed() ); |
|
83 }</function> |
|
84 </functions> |
|
85 </UI> |