package com.gaubert.test;

import com.trolltech.qt.gui.QAbstractItemView;
import com.trolltech.qt.gui.QApplication;
import com.trolltech.qt.gui.QListView;
import com.trolltech.qt.gui.QAbstractItemView.DragDropMode;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		//init app
		QApplication.initialize(args);
		
		//init view
	    QListView myTestView = new QListView();
	    myTestView.setSelectionMode(QAbstractItemView.SelectionMode.SingleSelection);
	    myTestView.setDragEnabled(true);
	    myTestView.setAcceptDrops(true);
	    myTestView.setDropIndicatorShown(true);
	    myTestView.setDragDropMode(DragDropMode.InternalMove);

	    //init model
		DraggableListModel myTestModel = new DraggableListModel();
		
		//set view with model
		myTestView.setModel(myTestModel);
		myTestView.show();
		
		//launch app
		QApplication.exec();
	}

}
