Commit 38e127f6 authored by Jakob Leben's avatar Jakob Leben

Qt: enable drag'n'dropping in listView

parent f7257d64
...@@ -257,7 +257,10 @@ PlIconView::PlIconView( PLModel *model, QWidget *parent ) : QListView( parent ) ...@@ -257,7 +257,10 @@ PlIconView::PlIconView( PLModel *model, QWidget *parent ) : QListView( parent )
setWrapping( true ); setWrapping( true );
setUniformItemSizes( true ); setUniformItemSizes( true );
setSelectionMode( QAbstractItemView::ExtendedSelection ); setSelectionMode( QAbstractItemView::ExtendedSelection );
setAcceptDrops( true ); setDragEnabled(true);
/* dropping in QListView::IconMode does not seem to work */
//setAcceptDrops( true );
//setDropIndicatorShown(true);
PlIconViewItemDelegate *delegate = new PlIconViewItemDelegate( this ); PlIconViewItemDelegate *delegate = new PlIconViewItemDelegate( this );
setItemDelegate( delegate ); setItemDelegate( delegate );
...@@ -269,8 +272,10 @@ PlListView::PlListView( PLModel *model, QWidget *parent ) : QListView( parent ) ...@@ -269,8 +272,10 @@ PlListView::PlListView( PLModel *model, QWidget *parent ) : QListView( parent )
setViewMode( QListView::ListMode ); setViewMode( QListView::ListMode );
setUniformItemSizes( true ); setUniformItemSizes( true );
setSelectionMode( QAbstractItemView::ExtendedSelection ); setSelectionMode( QAbstractItemView::ExtendedSelection );
setAcceptDrops( true );
setAlternatingRowColors( true ); setAlternatingRowColors( true );
setDragEnabled(true);
setAcceptDrops( true );
setDropIndicatorShown(true);
PlListViewItemDelegate *delegate = new PlListViewItemDelegate( this ); PlListViewItemDelegate *delegate = new PlListViewItemDelegate( this );
setItemDelegate( delegate ); setItemDelegate( delegate );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment