summaryrefslogtreecommitdiffstats
path: root/kjsembed/docs/examples/listview/listview.js
diff options
context:
space:
mode:
Diffstat (limited to 'kjsembed/docs/examples/listview/listview.js')
-rw-r--r--kjsembed/docs/examples/listview/listview.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/kjsembed/docs/examples/listview/listview.js b/kjsembed/docs/examples/listview/listview.js
new file mode 100644
index 00000000..5bca90c5
--- /dev/null
+++ b/kjsembed/docs/examples/listview/listview.js
@@ -0,0 +1,22 @@
+#!/usr/bin/env kjscmd
+
+// Create main view
+var mw = new KMainWindow();
+var box = new QVBox( mw );
+mw.setCentralWidget(box);
+
+var lv = new KListView( box );
+
+lv.addColumn('Pix');
+lv.addColumn('One');
+lv.addColumn('Two');
+lv.addColumn('Three');
+
+lv.insertItem( StdIcons.BarIcon("no"), 'Something', "Nothing", "Thing" );
+lv.insertItem( StdIcons.BarIcon("no"), 'Something', "Nothing", "Thing" );
+lv.insertItem( StdIcons.BarIcon("no"), 'Something', "Nothing", "Thing" );
+lv.insertItem( StdIcons.BarIcon("no"), 'Something', "Nothing", "Thing" );
+
+
+mw.show();
+application.exec();