mclark
11th October 2010, 20:04
When dragging between a QListView and a QTableView the drop indicator does not change, so the QTableView::dropEvent() is never called when releasing the mouse button. But, debugging code in the QTableView::dragEnterEvent() states:
DropAction: Qt::MoveAction
DragDropMode: QAbstractItemView:: DropOnly
DropIndicatorShown: TRUE
DragDropOverwriteMode: TRUE
I have a QStandardModel that services both a QGraphicsScene/View and the QTableView (the table view is filled via QSortFilterProxyModel class. Drops into the QGraphicsScene work fine.
Any ideas about what I can do to get the QTableView to show a drop indicator and allow dropEvent() to be called?
For reference, this is my table view ctor.
SheetView::SheetView( QWidget* pParent ) : QTableView( pParent )
{
setSelectionMode( QAbstractItemView::SingleSelection );
setAcceptDrops( true );
setDropIndicatorShown( true );
setDragDropMode( QAbstractItemView::DropOnly );
setDragDropOverwriteMode( true );
setSelectionBehavior( QAbstractItemView::SelectRows );
}
Qt Commercial 4.6.2
Windows XP SP3
DropAction: Qt::MoveAction
DragDropMode: QAbstractItemView:: DropOnly
DropIndicatorShown: TRUE
DragDropOverwriteMode: TRUE
I have a QStandardModel that services both a QGraphicsScene/View and the QTableView (the table view is filled via QSortFilterProxyModel class. Drops into the QGraphicsScene work fine.
Any ideas about what I can do to get the QTableView to show a drop indicator and allow dropEvent() to be called?
For reference, this is my table view ctor.
SheetView::SheetView( QWidget* pParent ) : QTableView( pParent )
{
setSelectionMode( QAbstractItemView::SingleSelection );
setAcceptDrops( true );
setDropIndicatorShown( true );
setDragDropMode( QAbstractItemView::DropOnly );
setDragDropOverwriteMode( true );
setSelectionBehavior( QAbstractItemView::SelectRows );
}
Qt Commercial 4.6.2
Windows XP SP3