Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

bool QListWidget::dropMimeData ( int  index,
const QMimeData data,
Qt::DropAction  action 
) [protected, virtual]

Handles the data supplied by a drag and drop operation that ended with the given action in the given index. Returns true if the data and action can be handled by the model; otherwise returns false.

See also:

Definition at line 1710 of file qlistwidget.cpp.

References QAbstractItemView::dropIndicatorPosition(), QAbstractItemModel::index(), QAbstractItemView::model(), and QModelIndex::model().

    QModelIndex idx;
    int row = index;
    int column = 0;
    if (dropIndicatorPosition() == QAbstractItemView::OnItem) {
        // QAbstractListModel::dropMimeData will overwrite on the index if row == -1 and column == -1
        idx = model()->index(row, column);
        row = -1;
        column = -1;
    return d_func()->model()->QAbstractListModel::dropMimeData(data, action , row, column, idx);

Generated by  Doxygen 1.6.0   Back to index