mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
try droping
This commit is contained in:
parent
b5006c5dbd
commit
df46218acc
@ -228,6 +228,8 @@ CSVWorld::Table::Table (const CSMWorld::UniversalId& id, CSMWorld::Data& data, Q
|
||||
|
||||
connect (selectionModel(), SIGNAL (selectionChanged (const QItemSelection&, const QItemSelection&)),
|
||||
this, SLOT (selectionSizeUpdate ()));
|
||||
|
||||
setAcceptDrops(true);
|
||||
}
|
||||
|
||||
void CSVWorld::Table::setEditLock (bool locked)
|
||||
@ -445,6 +447,22 @@ void CSVWorld::Table::mouseMoveEvent (QMouseEvent* event)
|
||||
|
||||
drag->setMimeData (mime);
|
||||
drag->setPixmap (QString::fromStdString (mime->getIcon()));
|
||||
drag->start();
|
||||
drag->exec();
|
||||
std::cout << "startdrag";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CSVWorld::Table::dragEnterEvent(QDragEnterEvent *event)
|
||||
{
|
||||
//if (event->mimeData()->hasFormat("text/plain"))
|
||||
std::cout << "accept drag event";
|
||||
event->acceptProposedAction();
|
||||
|
||||
}
|
||||
|
||||
void CSVWorld::Table::dropEvent(QDropEvent *event)
|
||||
{
|
||||
std::cout << "drop";
|
||||
event->acceptProposedAction();
|
||||
}
|
@ -52,6 +52,10 @@ namespace CSVWorld
|
||||
|
||||
void mouseMoveEvent(QMouseEvent *event);
|
||||
|
||||
void dragEnterEvent(QDragEnterEvent *event);
|
||||
|
||||
void dropEvent(QDropEvent *event);
|
||||
|
||||
public:
|
||||
|
||||
Table (const CSMWorld::UniversalId& id, CSMWorld::Data& data, QUndoStack& undoStack, bool createAndDelete, bool sorting);
|
||||
|
Loading…
x
Reference in New Issue
Block a user