code: def autoLayout(self):
          
          try:
              direction = self.currentSlide().scene().direction()
          except AttributeError:
              direction = QtGui.QBoxLayout.TopToBottom
          
          size = self.size()
          self._slideshow.resize(size)
          
          prev = self._previousButton
          next = self._nextButton
          
          if direction == QtGui.QBoxLayout.BottomToTop:
              y = 9
          else:
              y = size.height() - prev.height() - 9
          
          prev.move(9, y)
          next.move(size.width() - next.width() - 9, y)
          
          # update the layout for the slides
          for i in range(self._slideshow.count()):
              widget = self._slideshow.widget(i)
              widget.scene().autoLayout(size)
docs: Automatically lays out the contents for this widget.