title: Dragging from an inherited QTableView
body: <p>I have in my app a table view called "partsview" which is descended from a <code>QTableView</code>, this is on the main form. The relevant header code looks like:</p>
  
  <pre><code>class partsiew : public QTableView
  {
      Q_OBJECT
  public:
      explicit partsview(QWidget *parent = 0);
  public:
      QStringList mimeTypes() const;
      QMimeData *mimeData(const QModelIndexList &amp;indexes) const;
  };
  </code></pre>
  
  <p>I have also added the following into the constructor of "partsview":</p>
  
  <pre><code>this-&gt;setSelectionMode(QAbstractItemView::ExtendedSelection);
  this-&gt;setDragEnabled(true);
  this-&gt;setAcceptDrops(true);
  this-&gt;setDropIndicatorShown(true);
  </code></pre>
  
  <p>though the last two are probably not needed.</p>
  
  <p>When dragging, I can pick up a row and drag it to a target - a <code>QTreeView</code> - and I get the appropriate cursor and even a <code>dropMimeData</code> event is fired on the <code>treeview</code>.</p>
  
  <p>However, the row and column values in the <code>dropMimeData()</code> method are always -1 and the two methods in the "partsview" are not called.</p>
  
  <p>I'm guessing that the first error may have something to do with the second.  Have I declared the <code>mimeType()</code> and <code>mimeData()</code> methods correctly for them to be called during a drag operation.</p>
  
  <p>I have been following this page in the documentation <a href="http://doc.qt.digia.com/4.6/model-view-dnd.html#using-model-view-classes" rel="nofollow">QT4.6 - Using Model/View Classes</a></p>