I have searched the web for possibilities to realize this but haven't found a solution. Is there a simple way of removing an item from the list that is dropped on a non-receiving area or even outside the application's window?
So far I accept the delete key for removing items by means of a shortcut:
QShortcut *shortcut = new QShortcut(QKeySequence(Qt::Key_Delete), myList);
shortcut->setContext(Qt::WidgetShortcut);
connect(shortcut, SIGNAL(activated()), this, SLOT(deleteSelection()));
But since I add items to the list via drag and drop, I would like to be able to remove them in the same way, too. The items in the list can also be ordered via drag and drop.
Any hints or links are appreciated.