#NEWLINE# def closeEvent( self , event ) : #NEWLINE# #INDENT# '\n        On close, QT seems to scan through the entire model\n        if the data set is big. To sidestep that,\n        we swap out with a tiny data set before closing\n        ' #NEWLINE# from glue.core import Data #NEWLINE# d = Data ( x = [ 0 ] ) #NEWLINE# self . ui . table . setModel ( DataTableModel ( d ) ) #NEWLINE# event . accept ( )