I want the table widget to show some information when I clicked a certain button, so I defined a function in the mainwindow class
def consult(self): print