def selection(self):
        """Returns items in selection as a QItemSelection object"""
        sel = QtGui.QItemSelection()
        for index in self.selectedIndexes():
            sel.select(index, index)
        return sel
Returns items in selection as a QItemSelection object