Clears out the widgets from this stack.

def clear(self):
        """
        Clears out the widgets from this stack.
        """
        for i in range(self.count() - 1, -1, -1):
            w = self.widget(i)
            if w:
                self.removeWidget(w)
                w.close()
                w.deleteLater()