Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
5.6
-
None
Description
- Create app with QListView on QMainWindow.
- Subclass QStringListModel and reload flags(index) method.
- In this method switch off as QStringListModel::flags(index) & ~Qt::ItemIsDropEnabled;
- Attach sublcassed model to QListView.
- Set QAbstractItemView::InternalMove for the view.
As the result strings in list will be moved but won't be able to drop anywhere in this list. Disabled Qt::ItemIsDropEnabled flag must disable drop on to the items but it disables drop even between items.
The entire model/view present implementation looks ugly, non-comfortable and unfinished. There is no normal and simple way to create list of strings with easy D&D reordering - but this is the most demanded usage of D&D for QStringListModel. And there many other issues making present model/view implementation almost useless.