I created my own proxy model inherited by QSortFilterProxyModel. My original model for the aforementioned proxy model is also a custom model inherited by QAbstractTableModel. Then I set my own proxy model in QTableView.
In this custom proxy model, I reimplemented the mimeData (..) function. This is as follows.
QMimeData* CustomProxyModel::mimeData( const QModelIndexList & rListIndexes ) const { QMimeData *pMimeData = new QMimeData();
In Qt4.7, shortly after a user drops a QTableView element somewhere, the OnDestroyDraggedItem () slot is called. In other words, the QMimeData object is deleted shortly after the drag operation.
But in Qt 5.1, the OnDestroyDraggedItem () slot is never called. In other words, the QMimeData object is never deleted after a drag operation.
Am I doing something wrong? Or does Qt 5.1 have a memory leak after a drag operation? Is there any other way to find a drag operation?
source share