diff options
Diffstat (limited to 'kjsembed/tests/test_qlistview.js')
-rw-r--r-- | kjsembed/tests/test_qlistview.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/kjsembed/tests/test_qlistview.js b/kjsembed/tests/test_qlistview.js new file mode 100644 index 00000000..2f8f37bf --- /dev/null +++ b/kjsembed/tests/test_qlistview.js @@ -0,0 +1,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(); |