blob: 095559931e52de373453dc31ea39118b0bebcfee (
plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>Form1</class>
<include location="global" impldecl="in implementation">qdatetime.h</include>
<variable>QListViewItem *item;</variable>
<widget class="QDialog">
<property name="name">
<cstring>Form1</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>281</width>
<height>455</height>
</rect>
</property>
<property name="caption">
<string>Form1</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLineEdit">
<property name="name">
<cstring>number</cstring>
</property>
</widget>
<widget class="QListView">
<column>
<property name="text">
<string>Column 1</string>
</property>
<property name="clickable">
<bool>true</bool>
</property>
<property name="resizeable">
<bool>true</bool>
</property>
</column>
<property name="name">
<cstring>listview</cstring>
</property>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>number</sender>
<signal>returnPressed()</signal>
<receiver>Form1</receiver>
<slot>doInsert()</slot>
</connection>
<slot access="protected" language="C++" returnType="void">init()</slot>
<slot access="protected" language="C++" returnType="void">destroy()</slot>
<slot access="public" language="C++" returnType="void">doInsert()</slot>
</connections>
<functions>
<function name="init()" >{
qDebug( "here" );
item = 0;
}</function>
<function name="destroy()" >{
}</function>
<function name="doInsert()" >{
item = new QListViewItem( listview, "Hallo" );
item->setOpen( TRUE );
listview->clear();
int num = number->text().toInt();
QTime t;
t.start();
qDebug( "start" );
for ( int i = 0; i < num; ++i )
(void)new QListViewItem( listview, "Item " );
qDebug( "end items: %d took %d msec", num, t.elapsed() );
}</function>
</functions>
</UI>
|