Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Moove rows of QListView with keyboard



  • Hello, I'm working on a project with a list of items. I implemented a model based on QAbstractModel and a custom delegate.
    My problem is that i don't know how to moove an item using keyboard and not drag and drop?
    Can anyone help?



  • @Babs
    I presume that if you don't use d&d it's just a question of intercepting the keypresses in the list view and acting as desired on them, e.g. move an item at one index in the model to another index.