79219945

Date: 2024-11-24 11:35:53
Score: 2.5
Natty:
Report link

I think I got the solution :) Please give me a response if it is a bette way to do it.

Here is the delete method:

    # DELETE INCOME
    # ///////////////////////////////////////////////////////////////
    def deleteIncome(self):
        
        model = self.ui.tbl_income.model()
        rows = sorted(set(index.row() for index in
                          self.ui.tbl_income.selectedIndexes()))

        print(rows)
        for row in rows:
            print(f'Row {row} is selected')
            del_row = model.index(row, 0).row() #
            #, model.removeRow(del_row)
            dbc().deleteIncome(del_row)
        self.incomeViewSearch()
Reasons:
  • RegEx Blacklisted phrase (2.5): Please give me
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Dag