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

def setExpandedWidget(self, widget):

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