Details
Description
When generating the python code of a Widget with multiple *QTableWidget*s, the index that is assigned to the *horizontalHeaderItem*s keeps incrementing. See code snippet.
self.tableWidget.setColumnCount(3) self.tableWidget_2.setColumnCount(3) ... self.tableWidget.horizontalHeaderItem(0).setText(QtWidgets.QApplication.translate("MyForm", "New Column", None, -1)) self.tableWidget.horizontalHeaderItem(1).setText(QtWidgets.QApplication.translate("MyForm", "New Column", None, -1)) self.tableWidget.horizontalHeaderItem(2).setText(QtWidgets.QApplication.translate("MyForm", "New Column", None, -1)) self.tableWidget_2.horizontalHeaderItem(3).setText(QtWidgets.QApplication.translate("MyForm", "New Column", None, -1)) self.tableWidget_2.horizontalHeaderItem(4).setText(QtWidgets.QApplication.translate("MyForm", "New Column", None, -1)) self.tableWidget_2.horizontalHeaderItem(5).setText(QtWidgets.QApplication.translate("MyForm", "New Column", None, -1))
As a result, the code crashes as it tries to set the text in an Item that doesnt exist for the tableWidget_2
Attachments
For Gerrit Dashboard: PYSIDE-1035 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
266106,2 | WIP: Fix column_count in the uiparser | 5.12 | pyside/pyside-tools | Status: ABANDONED | -2 | 0 |
266326,3 | pyside-uic: re-init class variables per Widget | 5.12 | pyside/pyside-tools | Status: MERGED | +2 | 0 |
270532,5 | Update pyside2-tools submodule | 5.12 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
270588,3 | Update pyside2-tools submodule | 5.13 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
270593,3 | Update pyside2-tools submodule | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |