(self)
Clear the List
Clear the List
Clear the List
def clear_list(self):
        """ Clear the List
        """
        model = self.list_view.model()

        # go through all items and tell it gets removed
        for item in range(model.rowCount()):
            ptr = model.item(item, 0).text()
            self.remove_address(ptr)

        if model.rowCount() > 0:
            # something was wrong it should be empty
            model.removeRows(0, model.rowCount())
def clear_list ( self ) : model = self . list_view . model ( ) # go through all items and tell it gets removed for item in range ( model . rowCount ( ) ) : ptr = model . item ( item , 0 ) . text ( ) self . remove_address ( ptr ) if model . rowCount ( ) > 0 : # something was wrong it should be empty model . removeRows ( 0 , model . rowCount ( ) )