pyside QTableView disable edit mode

In default the QTableView will enable edit mode if user double clicks a table cell.

Following code will disable the edit mode:

 

In some old versions of Qt, QAbstractView will be used instead of QAbstractItemView. But in all versions of PySide, QAbstractView is not defined so QAbstractItemView need be used.