I have a dialogue with two QListView objects A and B, and I want to drag text strings from A to B, and vice verse. In my sub-classed QListview, ListView, I have populated A's model from a QStringList, and enabled the obejcts thus:

Qt Code:
  1. m_model_A = new QStringListModel;
  2. m_listview_A = new ListView(this);
  3. m_listview_A->setModel(m_model_A);
  4. m_listview_A->setSelectionMode(QAbstractItemView::ExtendedSelection);
  5. m_listview_A->setDragEnabled(true);
  6. m_listview_A->setAcceptDrops(true);
  7. m_listview_A->setDropIndicatorShown(true);
To copy to clipboard, switch view to plain text mode 
Idem for m_model_B / m_listview_B.

I have found several examples of drag and drop using QListWidget, but not for QListView. So I am unsure about what is already implemented in QListView. Subclassing QListView and reimplementing only dropEvent this function is called, but not if I also reimplement dragEnterEvent. Which cased my to wonder if dragEnterEvent perhaps does not need to be reimplemented for QListView? Also,
Qt Code:
  1. if ( event->mimeData()->hasText())
To copy to clipboard, switch view to plain text mode 
in dropEvent(QDropEvent *event) evaluates to false. So, do I need to reimplement dragEnterEvent and perhaps mousePressEvent when using QListView?