...
To make a widget invisible without deleting it use the qclose command. Many applications do not need qdelete, but rely on qshow, qclose, and qraise to manage visibility/invisibility issues.
...
The widget to be deleted. If this argument is omitted the current widget will be used.
treeitem
An item in a qtreewidget. If this argument is omitted the current treeitem will be used.
tableitem
An item in a qtablewidget. If this argument is omitted the current tableitem will be used.
...