code: def collapseBefore( self, handle ):
          
          self.setUpdatesEnabled(False)
          
          # collapse all items after the current handle
          if ( handle.isCollapsed() ):
              self.setSizes(handle.restoreSizes())
              
          # collapse all items before the current handle
          found = False
          sizes = self.sizes()
          
          handle.storeSizes(sizes)
          
          for c in range(self.count()):
              if ( self.handle(c) == handle ):
                  break
              
              sizes[c] = 0
          
          self.setSizes(sizes)
          self.setUpdatesEnabled(True)
docs: Collapses the splitter before the inputed handle.
          
          :param      handle | <XSplitterHandle>