TableModel: Qt: return valid flag from overridden Qt method.

Avoid warning messages of the kind:

 RuntimeWarning: Invalid return value in function
 QAbstractTableModel.flags, expected ItemFlags, got NoneType.