This is a fork of the code you can find in this page : http://stackoverflow.com/questions/19324641/qml-2-0-tableview-with-qabstractitemmodel-and-context-menu .