mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 22:35:27 +00:00
Set data done, drag & drop works
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7d53299831
commit
9042abc68c
1 changed files with 8 additions and 0 deletions
|
@ -144,7 +144,15 @@ void ColumnDropCSVView::dragMoveEvent(QDragMoveEvent *event)
|
|||
|
||||
void ColumnDropCSVView::dropEvent(QDropEvent *event)
|
||||
{
|
||||
QModelIndex curr = indexAt(event->pos());
|
||||
if (!curr.isValid() || curr.row() != 0)
|
||||
return;
|
||||
|
||||
event->acceptProposedAction();
|
||||
const QMimeData *mimeData = event->mimeData();
|
||||
if (mimeData->hasText()) {
|
||||
model()->setData(curr, QVariant(mimeData->text()));
|
||||
}
|
||||
}
|
||||
|
||||
ColumnNameResult::ColumnNameResult(QObject *parent) : QAbstractTableModel(parent)
|
||||
|
|
Loading…
Add table
Reference in a new issue