Я читаю PyTable с 1320000 строк x 16 столбцов.
Идея состоит в том, чтобы прочитать таблицу и записать ее содержимое в QTableWidget.
То, как я это делаю, приводит к краху графического интерфейса.
Я хотел бы подсказку о том, как сделать это эффективным способом.
Вот мой код:
#The PyTable is already opened and the reference to the desired table acquired
self.ui.tableWidget.setRowCount(tab.nrows)
self.ui.tableWidget.setColumnCount(len(tab.colnames))
self.ui.tableWidget.setHorizontalHeaderLabels(tab.colnames)
res = []
#Read the PyTable row by row and store the result
for x in tab.where('col1 > -1'):
res.append(x[:])
#Try to write the QTableWidget row by row
for i, row in enumerate(res):
for j, col in enumerate(row):
item = QTableWidgetItem(str(col))
self.ui.tableWidget.setItem(i, j, item)
#NOTE 1: with a PyTable with 1000rows X 16cols rows aprox it works perfect
#NOTE 2: with the huge PyTable with 1320000rows x 16cols, it does not work