Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.7.1
-
None
-
Windows 7 x64, Linux mint, clang, mingw64
Description
Hello, friends!
My model has flags disabling drag for 1st level indexes and drag enable for their leaves.
flags method
Qt::ItemFlags TreeModel::flags(const QModelIndex &index) const { if (!index.isValid()){ return {}; } Qt::ItemFlags result = Qt::ItemIsEnabled | Qt::ItemIsSelectable; if (!index.parent().isValid()){ // Group nodes can accept drop result |= Qt::ItemIsDropEnabled; } else{ //leaves can be draged result |= Qt::ItemIsDragEnabled; } return result; }
Selection behaviour set to SelectRows
When I select an item that was drag disabled and item that drag enabled together and then drag them and drop, TreeModel::removeRows calls with arguments to remove drag disabled item.