data updated can been fixed by using updateEditorGeometry but not background color :
def updateEditorGeometry( self, editor, option, index ):
# input data by here will update automatically
col = index.column ()
row = index.row ()
val = int(self.tm.arraydata[row][col])
editor.setValue (val)
editor.setGeometry(rect)