mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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)
|
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)
|
ColumnNameResult::ColumnNameResult(QObject *parent) : QAbstractTableModel(parent)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue