forked from qt-creator/qt-creator
ProjectExplorer: Support Drag and Drop in the project tree
E.g. moving a file from one pri file to another is much simpler for the user now. [ChangeLog] Source files can now be drag-and-dropped between project nodes in the project tree. Fixes: QTCREATORBUG-6446 Change-Id: I8bd4a7588fc5f2830f6585dfcb54ab4a547bc6b0 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -149,7 +149,9 @@ public:
|
||||
setEditTriggers(QAbstractItemView::EditKeyPressed);
|
||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
setDragEnabled(true);
|
||||
setDragDropMode(QAbstractItemView::DragOnly);
|
||||
setDragDropMode(QAbstractItemView::DragDrop);
|
||||
viewport()->setAcceptDrops(true);
|
||||
setDropIndicatorShown(true);
|
||||
m_context = new IContext(this);
|
||||
m_context->setContext(Context(ProjectExplorer::Constants::C_PROJECT_TREE));
|
||||
m_context->setWidget(this);
|
||||
|
||||
Reference in New Issue
Block a user