Python qtablewidget click event. This is the root cause of your problem.