fix tricky regression noticed by Vyacheslav Tokarev on Google Reader.
[kdelibs.git] / kde3support / tests / k3listviewtest.cpp
bloba5e5b0916336d72323d0bef8fc788a540aed4672
1 #include <kapplication.h>
2 #include <kcmdlineargs.h>
3 #include <kconfig.h>
4 #include <kdialog.h>
5 #include <kglobal.h>
6 #include <kvbox.h>
8 #include "k3listview.h"
10 int main( int argc, char **argv )
12 KCmdLineArgs::init( argc, argv, "klistviewtest", 0, ki18n("K3ListViewTest"), "1.0", ki18n("klistview test app"));
13 KApplication app;
14 KDialog dialog;
15 K3ListView *view = new K3ListView();
16 dialog.setMainWidget(view);
17 view->setSelectionModeExt( K3ListView::FileManager );
18 view->setDragEnabled( true );
19 view->setItemsMovable( false );
20 view->setAcceptDrops( true );
21 view->addColumn("Column 1");
22 view->addColumn("Column 2");
23 view->addColumn("Column 3");
25 new K3ListViewItem( view, "Item 1");
26 new K3ListViewItem( view, "Item 1");
27 new K3ListViewItem( view, "Item 1");
28 new K3ListViewItem( view, "Item 1");
29 new K3ListViewItem( view, "Item 1");
30 new K3ListViewItem( view, "Item 1");
31 new K3ListViewItem( view, "Item 1");
32 new K3ListViewItem( view, "Item 1");
33 new K3ListViewItem( view, "Item 1");
34 new K3ListViewItem( view, "Item 2", "Some more", "Hi Mom :)" );
36 view->restoreLayout( KGlobal::config().data(), "ListView" );
38 new K3ListViewItem( view, "Item 3" );
40 dialog.exec();
41 view->saveLayout( KGlobal::config().data(), "ListView" );
43 return 0;