Writing QTableWidgetItem with flagas to QDataStream
Unsolved
Qt for Python
-
Read/write with QTableWidgetItem works great except on read the item has default flags. Is this a known limitation and type should be written separately and then setFlags used on read?
Writing:
for row in range(row_count): for col in range(col_count): item = self.ui.results_view.item(row, col) datastream << item
Reading:
for row in range(rows): self.ui.results_view.insertRow(self.ui.results_view.rowCount()) for col in range(cols): item = QtWidgets.QTableWidgetItem() item.read(datastream) self.ui.results_view.setItem(row, col, item)
-
Hi,
From a quick look at the sources, only the values contained in the items are saved so yes, you will have to handle the flags separately.