'Set the widget with contents to show while collapsed.'

def setCollapsedWidget(self, widget):

    if (widget is self.__collapsedWidget):
        return
    if (self.__collapsedWidget is not None):
        self.__stack.removeWidget(self.__collapsedWidget)
    self.__stack.insertWidget(1, widget)
    self.__collapsedWidget = widget
    if (not self.__expanded):
        self.__stack.setCurrentWidget(widget)
        self.updateGeometry()
