[vlc-devel] commit: Qt: enable drag'n'dropping in listView (Jakob Leben )
git version control
git at videolan.org
Fri Feb 12 03:29:10 CET 2010
vlc | branch: master | Jakob Leben <jleben at videolan.org> | Fri Feb 12 03:26:30 2010 +0100| [38e127f60e8399cc8a721aabd25f721d8a5c6ba5] | committer: Jakob Leben
Qt: enable drag'n'dropping in listView
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=38e127f60e8399cc8a721aabd25f721d8a5c6ba5
---
modules/gui/qt4/components/playlist/icon_view.cpp | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/icon_view.cpp b/modules/gui/qt4/components/playlist/icon_view.cpp
index c35e1f9..72a9ca2 100644
--- a/modules/gui/qt4/components/playlist/icon_view.cpp
+++ b/modules/gui/qt4/components/playlist/icon_view.cpp
@@ -257,7 +257,10 @@ PlIconView::PlIconView( PLModel *model, QWidget *parent ) : QListView( parent )
setWrapping( true );
setUniformItemSizes( true );
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 );
setItemDelegate( delegate );
@@ -269,8 +272,10 @@ PlListView::PlListView( PLModel *model, QWidget *parent ) : QListView( parent )
setViewMode( QListView::ListMode );
setUniformItemSizes( true );
setSelectionMode( QAbstractItemView::ExtendedSelection );
- setAcceptDrops( true );
setAlternatingRowColors( true );
+ setDragEnabled(true);
+ setAcceptDrops( true );
+ setDropIndicatorShown(true);
PlListViewItemDelegate *delegate = new PlListViewItemDelegate( this );
setItemDelegate( delegate );
More information about the vlc-devel
mailing list