summaryrefslogtreecommitdiffstats
path: root/kjsembed/tests/test_qlistview.js
blob: 2f8f37bf65fe54143b0e810638a0bc8a523eacf0 (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
var lv = new QListView();
lv.rootIsDecorated = true;
lv.addColumn('Name');
lv.addColumn('Description');

var i = new QListViewItem( lv );
i.setText( 0, 'One' );
i.setText( 1, 'First item' );

var j = new QListViewItem( lv );
j.setText( 0, 'Two' );
j.setText( 1, 'Second item' );

var k = new QListViewItem( i );
k.setText( 0, 'Three' );
k.setText( 1, 'Third item' );

var l = new QCheckListItem( lv );
l.setText(0, 'Four' );

lv.show();

var lvi = lv.firstChild();
while( lvi )
{
	println( lvi.text(0) );
	lvi = lvi.nextSibling();
}

application.exec();