def load(self, columnNames, data):
        self.items = []

        self.statisticsTableModel = qt.QStandardItemModel()
        self.tableView.setModel(self.statisticsTableModel)
        self.tableView.verticalHeader().visible = False
        self.tableView.sortingEnabled = True

        policy = self.tableView.sizePolicy
        policy.setVerticalPolicy(qt.QSizePolicy.Expanding)
        policy.setHorizontalPolicy(qt.QSizePolicy.Expanding)
        policy.setVerticalStretch(0)
        self.tableView.setSizePolicy(policy)

        # Header
        self.statisticsTableModel.setHorizontalHeaderLabels(columnNames)

        for row in range(len(data)):
            rowData = data[row]
            for col in range(len(rowData)):
                item = qt.QStandardItem()
                item.setData(data[row][col], qt.Qt.DisplayRole)
                item.setEditable(False)
                self.statisticsTableModel.setItem(row, col,item)
                self.items.append(item)

        self.tableView.sortByColumn(0, 1)   # Sort by Date Descending
Auth wrapper
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/CIP_Common/CIP/ui/CaseReportsWidget.py/CaseReportsWindow.load--crossover with--dataset/ETHPy150Open NYUCCL/psiTurk/psiturk/user_utils.py/PsiTurkAuthorization.wrapper